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.

devxblackblue

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist