SQL SERVER – Generate Report for Index Physical Statistics – SSMS

Few days ago, I wrote about SQL SERVER – Out of the Box – Activity and Performance Reports from SSSMS (Link). A user asked me a question regarding if we can use similar reports to get the detail about Indexes. Yes, it is possible to do the same. There are similar type of reports are available at Database level, just like those available at the Server Instance level. You can right click on Database name and click Reports. Under Standard Reports, you will find following reports.

  • Disk Usage
  • Disk Usage by Top Tables
  • Disk Usage by Table
  • Disk Usage by Partition
  • Backup and Restore Events
  • All Transactions
  • All Blocking Transactions
  • Top Transactions by Age
  • Top Transactions by Blocked Transactions Count
  • Top Transactions by Locks Count
  • Resource Locking Statistics by Objects
  • Object Execute Statistics
  • Database Consistency history
  • Index Usage Statistics
  • Index Physical Statistics
  • Schema Change history
  • User Statistics

Select the Reports with name Index Physical Statistics. Once click, a report containing all the index names along with other information related to index will be visible, e.g. Index Type and number of partitions.

One column that caught my interest was Operation Recommended. In some place, it suggested that index needs to be rebuilt. It is also possible to click and expand the column of partitions and see additional details about index as well. DBA and Developers who just want to have idea about how your index is and its physical statistics can use this tool.

Click to Enlarge

Note: Please note that I will rebuild my indexes just because this report is recommending it. There are many other parameters you need to consider before rebuilding indexes.

However, this tool gives you the accurate stats of your index and it can be right away exported to Excel or PDF writing by clicking on the report.

Update: As Per Paul Randal this is un-killable and lots of IO, be careful about using it.

Reference : Pinal Dave (http://blog.SQLAuthority.com)

13 thoughts on “SQL SERVER – Generate Report for Index Physical Statistics – SSMS

  1. Pingback: SQLAuthority News – Three Posts on Reporting – T-SQL Tuesday #005 Journey to SQL Authority with Pinal Dave

  2. Just a thought, when you wrote:
    “Note: Please note that I will rebuild my indexes just because this report is recommending it. There are many other parameters you need to consider before rebuilding indexes.”

    I guess you really meant to say:
    ” I will NOT rebuild my indexes just because this report is recommending it.”

    I know, obvious, but anyway, just to be correct.

    Great site btw, helped me lots of times!

    //Richard

    Like

  3. Hi Pinal,

    Is there anyway one can find when and if re-indexing/re-organization was done on the tables in a database? Assume that there is no scheduled job that does this activity (which I can derive from the job’s history), how can I find this information. I have looked at the DMVs and catalog views but none of them (unlike Oracle) to the best of my knowledge has any record of the indexing process having occurred on (a) table(s)…

    Any hint or suggestion would be helpful
    Thanks,
    Venky

    Like

  4. hi sir,

    i run this report and found out that there are some tables need to be rebuilt and reorganize.

    i did the “operations recommended” thing which is rebuild and reorganize indexes.

    after running the task (1. check db integrity, 2. reorganize, 3. rebuild and 4. update statistics takes 26 hours) i re-run the report again and in “operations recommended” i still see the rebuild and reorganize…

    whole database (rebuild and reorganize) : not specific table/s.

    questions are:

    1. is this report accurate?
    2. why did i see the rebuild, reorganize again in the operations recommended column?
    3 what do you mean by: “Note: Please note that I will rebuild my indexes just because this report is recommending it. There are many other parameters you need to consider before rebuilding indexes.”

    thanks…

    josh

    Like

  5. When I try and access the index reports, I receive the error “Incorrect syntax near ‘(‘” Any idea what this error is all about and how to correct it?

    Like

  6. Pingback: SQL SERVER – Non-Clustered Index and Automatic Rebuild – Quiz – Puzzle – 11 of 31 « SQL Server Journey with SQL Authority

  7. Pingback: SQL SERVER – Difference between Create Index – Drop Index – Rebuild Index – Quiz – Puzzle – 21 of 31 « SQL Server Journey with SQL Authority

  8. Pingback: SQL SERVER – Standard Reports from SQL Server Management Studio – SQL in Sixty Seconds #016 – Video « SQL Server Journey with SQL Authority

  9. Pingback: SQL SERVER – Weekly Series – Memory Lane – #022 | SQL Server Journey with SQL Authority

  10. I looked at this but I remember back that there was a query that you can run, (DBCC?) that you can run that gave suggestions on what columns to index, or am I thinking wrong

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s