Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Surrogate vs natural vs artificial, clustered vs non
Message
From
04/09/2014 14:53:40
Walter Meester
HoogkarspelNetherlands
 
 
To
04/09/2014 09:55:56
Mike Yearwood
Toronto, Ontario, Canada
General information
Forum:
Microsoft SQL Server
Category:
Indexing
Environment versions
SQL Server:
SQL Server 2014
Application:
Web
Miscellaneous
Thread ID:
01603549
Message ID:
01607053
Views:
56
>>I'd take an non-clustered sequential integer or bigint as the PK index. If I was able to rewrite all applications I created, I'd do that. Clustered index could be bery usefull on certain queries, but I'd be very carefull when applying that.
>
>Even integers can be generated twice, so I never understood the argument against GUIDs might be generated twice. The primary key option would prevent the duplicate key in both cases, and you'd have to generate another one and re-attempt the insert. A difference which makes no difference is no difference.

Agreed. My main argument against a GUID is that it takes up quite a bit more space. Its less efficient. I'd use a GUID when records are created from disconnected systems.

>Thanks for the discussion! :)

Welcome
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform