GUID vs. Identity Column for Primary Keys

From the time I started using databases (Sybase 10, Microsoft SQL Server 6.5), I’d always used identity columns for primary keys in tables.  So when I came to my current employer and saw GUIDs all over the place, I wondered if that wasn’t overkill.

I did a bit of searching on the issues, and came up with these links:

The authors of these pieces can reasonably be described as pro-GUID.  They are up-front about the drawbacks of their preferred option (performance is a big one).  I tried the tip on using NewSequentialId() instead of NewId() (from Jeff Atwood) , but SQL Server Management Studio kept giving me errors when I attempted to update the default value of a table column to use it.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.