Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Converting SQL Server uniqueidentifier to .NET Guid type
Message
 
À
24/03/2009 13:03:35
Mike Cole
Yellow Lab Technologies
Stanley, Iowa, États-Unis
Information générale
Forum:
ASP.NET
Catégorie:
ADO.NET
Versions des environnements
Environment:
C# 3.0
Database:
MS SQL Server
Divers
Thread ID:
01391015
Message ID:
01391120
Vues:
51
I did a lot of research on this 3-4 years ago the online comunity does not agree on the guid vs. int PK. IMHO I think the speed and size benefits of int PK are far outweighed by the general maintenance and replication and/or offline access of the guid PK.

There was one article on how you could change the structure of the guid to make it faster, but I never pursued that.

>That's right, I remember those now. I'll have to throw that around in my head to see if I would benefit from this.
>
>>Yes, I use uniqueidentifier for my PK. Actually, GUIDs are preferred if you need replication and/or offline access.
>>
>>>Do you use SQL Server uniqueidentifier type as your Primary Keys? I did a little research on that a few weeks ago and found that identity integers were perferred, but ASP.NET Membership uses uniqueidentifier.
Semper ubi sub ubi.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform