Why does SQL Server add a 4 byte integer to non-unique clustered indexes

五迷三道 提交于 2019-11-29 12:24:56

A non-clustered index already includes the clustered index column so it can reference the exact row that it correlates to. Hence with the uniquifier on the clustered index, the non-clustered index would also include the uniquifier.

A good explanation here: Understanding and Examining the Uniquifier in SQL Server

I believe this has to do with the row locator.

Width of the nonclustered index row = Width of the nonclustered index column + Width of the clustered index column = size of column data type + size of column data type.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!