SQLTeam.com | Weblogs | Forums

Index WITH Include columns


#1

Hi,

short question: I have 2 indexes on same column each one with 3 separate include columns, is it ok to delete one and add the 3 columns from deleted to the remaining one? Thanks.


#2

I would give a qualified 'yes'.

If the indexes only have the one column as the indexed column it would be okay to combine them.


#3

I would agree with @djj55 that in most cases you can combine the two indexes into one. There may be exceptional cases where this might not be the best thing to do - for example, if the included columns for one index were narrow and the included columns in the other were wide and you were using the index with the narrow included columns much more frequently than the one with the wide included columns.


#4

Yes, typically you would combine them.

But you should also review the clustered index on the table and see if that column would make a better clustering key. One sign of the wrong clustering key is when you see multiple non-clustered indexes on another key column(s).


#5

Thank you all!