Using GUIDs as row identifiers
- 📅
- 📝 387 words
- 🕙 2 minutes
- 📦 .NET
- 💬 13 responses
Wade Wright is preaching that IDs in a database should always be GUIDs and lists four reasons. I commented there with my opinions but it hasn’t shown up — some people like to censor if you don’t agree with them completely. My points addressing each of his four ‘reasons’ were:
He does acknowledge that querying the database by hand is a bit of a pain but underestimates the Guid/uniqueidentifier performance penalty in SQL Server especially with regards to INSERTs (might be able to optimize there by having .NET generate the GUID instead of SQL Server).