Schema - Do you avoid using indexes on RowGuid column?

Last updated by ChristianMWaite almost 4 years ago.See history

RowGuids (uniqueidentifier) are large fields (16 bytes) and are basically going to ALWAYS be unique.

SQL Server adds a RowGUID column to all tables if you are using Merge Replication (but doesn't add an index).

RowGuids in general slow things down. Some people may consider using a RowGuid as their primary key. This is a bad idea because the index is going to be quite slow.... you are searching a large field. It goes without saying, NEVER have clustered index on a RowGuid column.

Another little annoyance with RowGuids is when you are searching for one. You can't use > or < on a RowGuid column.

**Note: ** There are not many cases where a RowGuid should have an index on it.

Be aware that SQL server adds this column when you perform merge replication. There are not many cases where this should have an index on it.

We open source. Powered by GitHub