Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Converting SQL Server uniqueidentifier to .NET Guid type
Message
From
24/03/2009 14:36:52
Mike Cole
Yellow Lab Technologies
Stanley, Iowa, United States
 
General information
Forum:
ASP.NET
Category:
ADO.NET
Environment versions
Environment:
C# 3.0
Database:
MS SQL Server
Miscellaneous
Thread ID:
01391015
Message ID:
01391123
Views:
45
I'm in the same boat.

>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.
Very fitting: http://xkcd.com/386/
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform