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 2005 Forums
 Transact-SQL (2005)
 Basic question

Author  Topic 

timmemac
Starting Member

6 Posts

Posted - 2010-05-13 : 15:37:08
Hi,

I have two table Customers and Orders.CustId is the PK and is referenced in Orders table as FK.will the CustId in Orders table be indexed as Clustered index along with CustId of Customers table(as this is PK).

Regards
Tim


tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2010-05-13 : 15:59:29
Foreign keys don't get automatically indexed. You should add an index to all foreign keys as a standard since they are often used in joins.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page
   

- Advertisement -