Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
What does PK and index do for a table?
Message
De
23/10/2018 10:40:38
Metin Emre
Ozcom Bilgisayar Ltd.
Istanbul, Turquie
 
 
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Conception bases de données
Divers
Thread ID:
01662673
Message ID:
01662740
Vues:
44
>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)?

you can use identity column for match records between sql server and VFP (or which app do you use). you can also use primary key for updates. But if you want to update your primary key what do you use? So like:

update myTable set my_primarykey = "123" where my identity_column = 123456

you can use timestamp or anything else for this. Sample Microsoft Axapta uses a field named RecId instead of identity column.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform