What to do with Multiple Similar Index Reccommendations

  • Thanks for great sql that reveals more about SQL Server, but I have a question.

    The Util_MissingIndexes stored procedure returns multiple rows that appear to be saying that I need three new indexes on the same table (Enc), but each new index is a subset of the first recommendation.

    For instance, the sp returned the following three rows (shortened for this message)

    1dbo291297339EncU 75300683412.063[PtObjId], [EnableFinPrcsInd][ObjId][StsCd], [StrDate], [StrTime], [TypeCd], [StpDate]2702302.8782994546900698.76000019969.321849

    1dbo291297339EncU 75300683412.063[PtObjId], [EnableFinPrcsInd][ObjId][StsCd], [StrDate], [TypeCd], [StpDate]2523002.8739419986695298.79000014854.523323

    1dbo291297339EncU 75300683412.063[PtObjId], [EnableFinPrcsInd][ObjId][StrDate], [StrTime], [TypeCd]2461302.8772684497817598.82000013121.904437

    So my question is, if the first row says I should index the following columns in the Enc table - [StsCd], [StrDate], [StrTime], [TypeCd], [StpDate], should I create indexes for the second and third rows that would also index the exact same columns, or will SQL Server be able to find them in the first index.

    Thanks

    James

  • They are not unnecessarily recommended indexes. They are index combinations that the optimizer wanted to have but didn't.

    In your case, I would make one index that encompasses all three since the seeks overlap 100% and only the includes are different. Order doesn't matter on includes.

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply