php - In mysql which is the best way to fetch friends data with join statement or In statement? -


in social networking site have scenario taking news feed of friends against logged in user.

i have user table, membership table , feed table. here membership table using friends data. user table have more 100k entries , membership take have more 400k entries.

i have 2 way take friends feed... either joining feed , membership tablle

select * feed join membership on ... .... 

or in statement like

select * feed user_id in (userids of friends) 

here facing loading issue when making join statement newly registered user having single friend.

so best method along robust future run ?


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -