Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Primary keys and clustered indexes
Message
From
29/06/2006 21:00:21
 
 
To
29/06/2006 19:21:37
General information
Forum:
Microsoft SQL Server
Category:
Database design
Miscellaneous
Thread ID:
01132920
Message ID:
01132960
Views:
10
I think so. But I think using invoice no. in primary key, since it will be part of the primary method of selecting recs also helps.


>Thanks Perry...
>
>Isn't the table in the same order for both option 2 and 3?
>
>
>>I sit next to a DBA now. I asked him. He reccommended option 3. So selects will be much faster, since the table will be in that order.
>>
>>>Some options I see for the detal table:
>>>
>>>1) primary key: lineID, but with a non-clustered index. clustered index on invoiceID.
>>>
>>>2) primary key: lineID, but with a non-clustered index. A clustered index on invoiceID + lineID.
>>>
>>>3) primary key: invoiceID + lineID, with clustered index on the combination.
>>>

(On an infant's shirt): Already smarter than Bush
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform