Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multiple Column Key or a Single Autonumber Key

Status
Not open for further replies.

miteetall

Programmer
Jul 1, 2003
21
US
For SQL Server 2K, which is most efficient, a multiple column key or a single autonumber key? On the face of it, it would seem that indexing might be quicker with a single column autonumber primary key. We have tables with as many as 9 columns comprising a multiple column key.
 
more efficient for what purpose?

for example, if you have an identity column, and make this your primary key, and you forget to declare a unique constraint on the relevant candidate key(s), then sooner or later you will have "duplicates"

that's got to be one of the most common questions in these databases forums -- "how do i remove all of the duplicates except one?"

so when you factor in all the lost people productivity time to fix issues like that, not to mention the overhead of having two unique indexes on the table instead of one...

what was the question again?

:)

r937.com | rudy.ca
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top