Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Why are GUID's bad?
Message
De
01/06/2010 11:00:24
Timothy Bryan
Sharpline Consultants
Conroe, Texas, États-Unis
 
 
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Conception bases de données
Versions des environnements
SQL Server:
SQL Server 2008
Divers
Thread ID:
01465866
Message ID:
01466866
Vues:
66
>>>>Hi all,
>>>>
>>>>I just attended a SQL Saturday in Dallas this past Saturday and I got the impression GUID's were not such a great idea for PK's. I would like to understand why that is, and what is the best choice for tables with lots of records.
>>>>Thanks
>>>>Tim
>>>
>>>Identity int (or bigint) fields are generally recommended. If you insist on using GUID, use NewSequentialID() function to generate them.
>>
>>Naomi,
>>
>>Can you give me some idea as to why Guid's are no longer the recommended way? There was a day, when GUID's was the recommended key since they were always unique accross all boundary's. An int may be smaller in the db but how on earth would I merge two tables together with an int for the key? I am not advocating either, just trying to get in the know.
>>
>>What does NewSequentialID() funchtion do that is different?
>>Thanks a bunch
>>Tim
>
>
>Another discussion on this topic which may be of help http://forums.asp.net/t/1248405.aspx

Interesting read, thanks. I didn't know about the fill factor.
Tim
Timothy Bryan
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform