Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 performance - Joins using Index / normal columns

Author  Topic 

myjunk
Starting Member

2 Posts

Posted - 2006-08-19 : 14:55:49
Which has greater performance gains? joins using primary keys/indexes whenever possible or can any other columns be used?

eg:
select
A,
index_A
from
tableA
join tableB
on tableB.indexA = tableA.indexA


select
A,
index_A
from
tableA
join tableB
on tableB.A = tableA.A


Can anyone tell me how we can see which is more efficient using a profiler/explain etc?

AndrewMurphy
Master Smack Fu Yak Hacker

2916 Posts

Posted - 2006-08-21 : 05:31:09
Index....they exist for 'performance'....and 'controlling uniqueness'.
Go to Top of Page

vishnu.cm
Starting Member

7 Posts

Posted - 2006-08-29 : 03:36:06
I suppose , the primary key join will be more faster than the index column join ,
use Ctrl + L query plan to understand the performance.

my attitude is my disguise
Go to Top of Page
   

- Advertisement -