具有索引的uniqueidentifier [英] uniqueidentifier with index
问题描述
如果uniqueidentifier数据类型列为集群/表中的非集群索引sql server 2005/2008将会产生什么影响。我读了它是非常设计的表,如何避免这个问题和什么是最好的解决方案?
what will be the effect if uniqueidentifier data type column is clustered/Non Clustered index in a table sql server 2005/2008. I read it is badly designed table, how to avoidy this problem and what is the best solution?
推荐答案
聚集,它只是意味着索引将是宽的(每行16字节,而不是每行4个字节,整数)。
If it is non-clustered, it just means the index will be wide (16 bytes per row, rather than 4 bytes per row with an integer).
如果它是聚类的,则插入将导致页面分割,取决于您在创建/重建索引时离开的可用空间(填充因子)多少。
If it is clustered, then insertions will lead to page splits, depending on how much free space (Fill Factor) you leave in the index when you create/rebuild it.
有关SO讨论的几个问题这个话题:
There are a few questions on SO discussing this topic:
这篇关于具有索引的uniqueidentifier的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!