Quick question about efficiently implementing Facebook 'news feed' like functionality

Im sure most are familiar with Facebooks 'news feed'. If not, the 'news feed' basically lists recent activity of all of your friends.

I dont see how you can get this information efficiently from a DB:

   * Im assuming all user activity is inserted in a "actions" table.
   * first get a list of all your friends
   * then query the actions table to return recent activity where the activity belongs to someone on your friends list

This can't be efficient especially considering some people have 200+ friends.

So what am I missing? How do you think Facebook is implementing their "news feed".
Im not asking for any specific details, just a general point in the right direction, as I cant see how they are implementing the 'news feed efficiently.