Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Why are GUID's bad?
Message
De
25/05/2010 19:55:27
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
25/05/2010 09:23:45
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:
01465991
Vues:
83
>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

Tim,
It is about being on what camp you are in. I am in GUID camp and I think GUIDs are perfect idea for primary key fields. Search for COMB GUID and you would find Jim Wilson's (I hope I remember the name right) "sequential" GUID before NewSequentialID() existed and his article about it (along with benchmarks that shows GUID is not bad). Also you would find C# code for creating those COMB GUIDs. COMB GUIDs are important because generally the developers who use GUIDs want to know the keys before connecting to backend (say working on notebook on the field and there is no wireless support). SQL server have NewSequentialID() and newID() but you need to trip to server to get them and sort of defeats the purpose of preferrring GUIDs.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform