Include indexes sql server suggestions

  • Hi All,

    My questions is regarding Iclude columns in indexes. If I create indexes with different include columns on same field will it boost my performance? eg

    Index1, Index field:Employee Id, Include field:Department Id

    Index2, Index field:Employee Id, Include field:Organization Id, Department Id

    Index3, Index field:Employee Id, Include field:Organization Id, Previous Department Id

    Can I consolidate above index to a single index?

    Index3, Index field:Employee Id, Include field:Organization Id, Previous Department Id, Department Id

    Is sequence important?

    Note : If these indexes have been automatically created by DBA based automatic analyser suggestions and plans. Should this technique be followed should we create indexes for all aumatic query plans?

    BR

    San

  • Sachin Bankar (12/2/2014)


    Can I consolidate above index to a single index?

    Yes

    Is sequence important?

    Not of includes

    Note : If these indexes have been automatically created by DBA based automatic analyser suggestions and plans. Should this technique be followed should we create indexes for all aumatic query plans?

    Never automatically create indexes based off query plans. Always test and see if the index is even useful, check for similar indexes that can be altered. Use some common sense as to whether the index is a good idea or not

    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