Information générale
Forum:
Microsoft SQL Server
>>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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement