top of page

Clustered index column in non-clustered indexes

  • Adam Thurgar
  • Jul 26, 2017
  • 1 min read

Whilst recently reviewing performance issues on a large legal system, I noticed that every non-clustered index, explicitly included the column/s of the clustered index. This is unnecessary as SQL Server adds the columns of the clustered index into the non-clustered index and effectively 'hides' these columns. Therefore you don't need to include them in the definition. There is no real penalty for having these duplicates - although any updates to the clustered index columns would occur twice and the size of the non-clustered index is larger. Any index reorganisation or statistic updates may also take fractionally longer.


Recent Posts

See All
Insert query performance improvement

I was asked the other day was there any way to improve the performance of a large number of rows being inserted. My immediate thought was...

 
 
 

Comments


bottom of page