Should I get rid of clustered indexes on Guid columns

后端 未结 9 565
遇见更好的自我
遇见更好的自我 2020-12-05 17:19

I am working on a database that usually uses GUIDs as primary keys.

By default SQL Server places a clustered index on primary key columns. I understand that this is

9条回答
  •  离开以前
    2020-12-05 17:41

    As most have mentioned, avoid using a random identifier in a clustered index-you will not gain the benefits of clustering. Actually, you will experience an increased delay. Getting rid of all of them is solid advice. Also keep in mind newsequentialid() can be extremely problematic in a multi-master replication scenario. If database A and B both invoke newsequentialid() prior to replication, you will have a conflict.

提交回复
热议问题