Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Changing PK from non-clustered to clustered
Message
De
07/07/2016 09:25:46
 
 
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Divers
Thread ID:
01637980
Message ID:
01638032
Vues:
46
>>I understand what you are saying. But in the case that I am describing - PK column being an Identity and INT type - is there a downside to making the PK constraint clustered (vs. non-clustered)? I would leave it non-clustered but the execution plan clearly shows that the clustered index is used in much greater percentage.
>
>The ever increasing identity column is the best candidate for the clustered PK. You made a right switch, by default SQL Server makes PK column clustered. Perhaps you originally somehow made it non-clustered.

My base rule of thumb is if the PK is (automatically) server generated, there is a good chance of clustered index having overall positive perf characteristics. UC where clients generate ID's (typically GUID related keys) should not have a clustered index.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform