Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Primary keys and clustered indexes
Message
De
29/06/2006 21:00:21
 
 
À
29/06/2006 19:21:37
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Conception bases de données
Divers
Thread ID:
01132920
Message ID:
01132960
Vues:
11
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform