• This is a nice script. I have a similar one I have been using and I made some improvements based on what you did. Thanks for sharing.

    One thing to note: your ORDER BY clause very complex. When I ran this on a small VM it choked and literally told me the query was too hard (not enough memory, I think). I chopped off the ORDER BY and it worked fine. For me this doesn't matter because I copy the results into a spreadsheet and do my analysis there.

    I don't really understand your "score" column. Is it to show the indexes that are most important?

    I recently ran across the following article with scripts from Jason Strate that also deal with analyzing indexes, but he has taken it to a whole other level.

    http://www.sqlservercentral.com/blogs/stratesql/2012/12/18/index-analysis-the-re-return/