Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Changing PK from non-clustered to clustered
Message
De
06/07/2016 16:32:12
 
 
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Divers
Thread ID:
01637980
Message ID:
01637982
Vues:
52
Clustered indeces are not a panacea. You have to understand how they work or performance suffers. A lot.


>I am testing various scenarios of making SQL Select last 100 (top 100 order desc) records executing faster. The current PK constraint (on ORDER_NO) is non-clustered. I change it (in SSMS) from non-clustered to clustered. It took a little time (I understand that all non-clustered indexes have to be rebuilt). Now SQL Select works much faster and execution plan shows that the PK clustered index is used about 99%.
>All seems to be good.
>
>Two question:
>1. Why by default when I was creating the PK (a while ago) SQL Server created non-clustered?
>2. What are the downsides of making this PK clustered? It is an order number assigned and is never changed.
>
>TIA
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform