Is a join faster with 5 tables joined together Or 5 separate queries? I have confusion that I already have in my application 5 tables say a,b,c,d,e and have relationship with each other like a.b_id is primary key of b and chain goes on.
Now my question is that which approach will give me better performance/faster result?
5 queries
Or
A query join with 5 tables?
Thank you.
Look at it this way...  There is  a lot of overhead in each SELECT:

Round trip between client and server
Allocate a thread to work on the query
Parse the SQL
Optimize it
Perform it  (The meat!)
Send the results back

In some experiments, I have seen the &quot;overhead&quot; be 90% of the work.  5 queries takes nearly 5 times the overhead.