Home Forums SQL Server 2012 SQL 2012 - General Creating index on multiple columns separately or should be avoided to gain performance for add/update and select cases RE: Creating index on multiple columns separately or should be avoided to gain performance for add/update and select cases

  • And remember, the order of the keys on the indexes matters quite a bit, especially for the first column since that determines what is in the histogram of the statistics. This means in a case where you have ID1 & ID2 in one index, ID2 & ID1 in a different index may work better for some queries, differently than the first index. As Gail says, testing is the only way to be sure.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning