Showing posts with label inner. Show all posts
Showing posts with label inner. Show all posts

Friday, February 17, 2012

Efficiency with INNER JOINs

Hi,
Is there an efficiency issue with INNER JOINs? For example, is there a
difference betweeen tableA INNER JOIN tableB and tableB INNER JOIN tableA?
What's the performance doing tableA INNER JOIN tableB INNER JOIN tableC etc?
Thanks,
Mats-LennartMats
> Is there an efficiency issue with INNER JOINs? For example, is there a
> difference betweeen tableA INNER JOIN tableB and tableB INNER JOIN tableA?
>
Actually there is no difference. The optimizer will choose the order to join
tables.
> What's the performance doing tableA INNER JOIN tableB INNER JOIN tableC
> etc?
>
I have always tried to create an index on foreign key column ( participate
in JOIN) to improve performance
http://www.sql-server-performance.com/tuning_joins.asp
"Mats-Lennart Hansson" <ap_skallen@.hotmail.com> wrote in message
news:%23RygRo2OGHA.1288@.TK2MSFTNGP09.phx.gbl...
> Hi,
> Is there an efficiency issue with INNER JOINs? For example, is there a
> difference betweeen tableA INNER JOIN tableB and tableB INNER JOIN tableA?
> What's the performance doing tableA INNER JOIN tableB INNER JOIN tableC
> etc?
> Thanks,
> Mats-Lennart
>|||Differnent writing of the queries often doesn=B4t interfer the
performance difference in query, though the query pocessor and
optimizer will make a plan on his own which tabe to query first and so
on to get the best performance for your statement.
HTH, Jens Suessmeyer.