Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Understanding PK index
Message
 
 
À
Tous
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Titre:
Understanding PK index
Divers
Thread ID:
01629831
Message ID:
01629831
Vues:
48
Hi,

When I make a field to be a Primary key (the field is Int type and Identity is set ON), SQL server creates a KEY named PK_Table_Name and at the same time it creates a Unique Non-Clustered index of the same name (e.g. PK_Table_Name). Will SQL use this index when optimizing searches that include the PK field?

The reason I am asking is that I noticed that - somehow - when I was creating the table I created a separate Non-Unique and Non-Clustered Index On the same fields (which is the PK field). Therefore, my question is, would it be Ok to delete this "extra" index that I created?

TIA
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform