Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
What does PK and index do for a table?
Message
 
 
À
Tous
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Conception bases de données
Titre:
What does PK and index do for a table?
Divers
Thread ID:
01662673
Message ID:
01662673
Vues:
69
Hi,

I was creating a report based on a table in SQL Server and noticed that it was very slow. I realized that the problem was that the field/column used in selecting the records didn't have an index. I added an index on this field/column and report performs much better.

But I also noticed that this table has an identity field but it is not set as Primary Key. How important is it to set an identity column as a Primary Key (which of course will create the index)?
"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