Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 Database Design and Application Architecture
 To cluster or not to cluster that is the ?

Author  Topic 

BruceT
Yak Posting Veteran

78 Posts

Posted - 2011-03-11 : 16:50:20
Hi,
If you had a table that was going to have several million rows and the primary key was a guid would you have a clustered or non-clustered index on that column? There are several other tables that join back to that one on the primary key.

Thanks

robvolk
Most Valuable Yak

15732 Posts

Posted - 2011-03-11 : 16:51:43
Do not create clustered indexes on GUID columns, ever. For reasons why, read this:

http://www.sqlskills.com/BLOGS/KIMBERLY/post/GUIDs-as-PRIMARY-KEYs-andor-the-clustering-key.aspx
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2011-03-11 : 17:01:27
And this one too: http://www.sqlskills.com/BLOGS/KIMBERLY/post/Disk-space-is-cheap.aspx

GUIDs are evil!

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

BruceT
Yak Posting Veteran

78 Posts

Posted - 2011-03-14 : 09:19:45
Great, thanks for the info.
Go to Top of Page
   

- Advertisement -