• Cliff Jones (11/18/2009)


    The Tuning Adviser often recommends that a column which is also a part of the Clustered index be added as an included column. I do not do this since I assume that it is included in the index anyway. Would including such a column make the index larger for no apparent gain?

    Depends where it's suggesting that the column be added. Sure, the clustering key will be there (though whether or not it can be used for seeks depends on a property of the index, specifically unique) but, as far as I know it's the last column. If the recommendation has the clustering key earlier in the index key, then it may be necessary. If it's just specified as an include it may be unnecessary.

    That said, the clustering key isn't going to be there twice. If you explicitly define it as part of the index key, SQL's not going to add it again.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass