devxlogo

Keep Your Clustered Index’s Weight Down

Keep Your Clustered Index’s Weight Down

In SQL Server 7, a significant change was made to the way nonclustered indexes work when a clustered index exists on a table. In version 6.5, the nonclustered index used the rowid of each row to point back to the data. This meant that when you rebuilt a clustered index and reordered all the rows (thus changing the rowid) all the nonclustered indexes also had to be rebuilt. In version 7, a nonclustered index stores the key value of the clustered index as the method of retrieving the actual row. Therefore, as your clustered index gets wider, every nonclustered index will take up that much more space.

devx-admin

Share the Post: