Can I merge 2 or 3 Indexes that Missing_Index query suggested (in this way) ?

  • I Run Missing index , And it suggested (for example for one table) these indexes :

    CREATE INDEX IDX_1 ON [DB].[dbo].[TBL1] ([F1]) INCLUDE (F4,F5)

    CREATE INDEX IDX_2 ON [DB].[dbo].[TBL1] ([F1], [F2])

    CREATE INDEX IDX_3 ON [DB].[dbo].[TBL1] ([F1]) INCLUDE (F6)

    Can I Merge These to :

    CREATE INDEX IDX_1 ON [DB].[dbo].[TBL1] ([F1],[F2]) INCLUDE (F4,F5,F6)

  • Yes.

    Before you do so, test and ensure that the index is useful and makes an appreciable improvement in the performance of the queries that it's intended to help.

    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

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

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