Mike Yearwood
Toronto, Ontario, Canada
Information générale
Catégorie:
Bases de données
Versions des environnements
Network:
Windows 2003 Server
>PKs are used to enforce referential integrity, which is a function of the DB...hence they should be generated there. Additionally, using an integer allows you to use a clustered index, which improves performance.
PKs are used to enforce referential integrity so they only have to be unique. Where they are generated is a different issue. Right?
Integer performance is good, but why does SQL's newid function generate guids?
>
>
>>I've been leaning towards using guids as the PK all the time. It certainly takes longer to generate, but as I also don't have SQL generating the PK, since it's sent in the update, the performance is distributed from the server to the clients - whatever they are.
>>
>>I'd like to hear your thoughts on that, if you can spare some time?
Précédent
Suivant
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