January 26, 2012 at 7:34 am
My understanding is that SQL Server will use the primary key index in order to optimize the nonclustered indexes (I may be way off on this, so let's start with that assumption and if it is wrong, then we can just ignore the next part of the question).
Going under the assumption that my previous statement is actually valid, then, if there isn't a primary key, but there is a clustered index, will the system use the clustered index as a reference in order to optimize the non-clustered indexes or is this functionality only associated with the 'primary key' index?
January 26, 2012 at 7:37 am
lorra (1/26/2012)
My understanding is that SQL Server will use the primary key index in order to optimize the nonclustered indexes
Nope. The primary key is totally irrelevant for anything to do with nonclustered indexes. The clustered index key is what is used as a pointer to the data row when the table has a clustered index.
Clustered index != primary key.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
January 26, 2012 at 7:49 am
Perfect. Thanks for the clarification.
January 26, 2012 at 7:55 am
When we are splitting hairs anyway, should I add we can have only one Primary Key (simple or composite) on a table? This limitation is not applicable to Unique Keys.
January 26, 2012 at 8:07 am
Please note the original thread is almost 2 years old.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
January 26, 2012 at 8:24 am
But it’s still active...
Viewing 6 posts - 31 through 35 (of 35 total)
You must be logged in to reply to this topic. Login to reply