• dwilliscp (1/7/2013)


    SQLRNNR (1/7/2013)


    dwilliscp (1/7/2013)


    GSquared (1/7/2013)


    "When to index" isn't a question of the query. Not really. It's a question of what you're trying to do.

    There's no way to tell, from what you wrote, wether you should index something or not.

    Start out with a book on performance tuning. Read online articles on it, too, but pick out a good book as a first step.

    My readings are:

    A Guide for the Accidental DBA, Mastering Server Profiler, Performance Tuning DMV, SQL Server Tacklebox.

    Any suggestions?

    I'd start with these

    A Guide for the Accidental DBA

    Performance Tuning DMV

    Those are the books that I have already read, in the past year. They are helpful, but do not cover the details of when to create an index. (I believe the index script came out of the accidental DBA book.)

    Besides the link that Gail just provided, you can use that script as a starting point. But do not rely solely on the output of that script. For scripts similar to that, I don't even start to look at the proposed index unless I know it is related to a poorly performing piece of the application. Or, I will loosely regard the results starting at an impact level of 1000 or greater.

    You should be careful with the column order in the provided script as well. Investigate the Execution Plan that is associated to the missing index and ensure the column order is correct.

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events