I have two database table 'friends' and 'published_post'
`friends` --- contains 650K rows
--------------------------------------------------------
| fb_id_user(bigint) | fb_id_friend(bigint) | fb_username(text) |
---------------------------------------------------------
`published_post` ----- contains 6K rows
-------------------------------------------------------------------------------
| id(primary_key)(int) | fb_id(bigint) | post(text) | post_date(DATE_TIME) |
-------------------------------------------------------------------------------
suppose a user has facebook id '12345'. I want to get all the post(form published_post table) given by his friends(from friends table where fb_id_user = '12345') in descending order of 'post_time'.
Any suggestion how this query can be done efficiently would be very helpful.