May 14, 2009 at 1:11 am
Hi friends,
I am running a query which involves a 11 tables with millions of records in each table.
And the query involves inner join of all the 11 tables
What is faster?
using inner join among the tables or using in operator?
kindly suggest ASAP.
May 14, 2009 at 1:25 am
Please check below link
http://weblogs.sqlteam.com/mladenp/archive/2007/05/18/60210.aspx
Regards
Swayambhu
MCDBA, MCAD
May 14, 2009 at 6:54 am
It really depends on the query being run. Most of the time, a JOIN is the preferred methodology. However, there are queries where the IN statement will work just as well or better. But those are generally the exception. Without more detail, it's hard to say in your case.
Write the query both ways and get the statistics IO & time and the execution plans and compare them. Take the one that works the best.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply