Database Tuning Adviser

  • Good Day.

    On our SQL Server 2008R2 we identified an inefficient query . We ran it through the Database Tuning Adviser and advised us to add 2 indexes . The same columns were identified , but the only difference was the order of the columns . This makes no sense to me . Any ideas ?

  • Index column order is important

    http://sqlinthewild.co.za/index.php/2009/01/19/index-columns-selectivity-and-equality-predicates/

    That said, test the indexes, if they help, implement them (or one). If they don't, then don't.

    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
  • lianvh 89542 (5/23/2013)


    Good Day.

    On our SQL Server 2008R2 we identified an inefficient query . We ran it through the Database Tuning Adviser and advised us to add 2 indexes . The same columns were identified , but the only difference was the order of the columns . This makes no sense to me . Any ideas ?

    I've always felt that looking first at improving the query (not all methods for constructing queries that return the same results perform the same) and then think about adding indexes was the correct approach.


    My mantra: No loops! No CURSORs! No RBAR! Hoo-uh![/I]

    My thought question: Have you ever been told that your query runs too fast?

    My advice:
    INDEXing a poor-performing query is like putting sugar on cat food. Yeah, it probably tastes better but are you sure you want to eat it?
    The path of least resistance can be a slippery slope. Take care that fixing your fixes of fixes doesn't snowball and end up costing you more than fixing the root cause would have in the first place.

    Need to UNPIVOT? Why not CROSS APPLY VALUES instead?[/url]
    Since random numbers are too important to be left to chance, let's generate some![/url]
    Learn to understand recursive CTEs by example.[/url]
    [url url=http://www.sqlservercentral.com/articles/St

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

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