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 (https://blog.sqlauthority.com)
10 Comments. Leave new
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
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
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
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?
Post the actual code you have used
Thank you. I subsequently figured out that our database is set to run under campatibility mode of 2000 and reports are only supported at 2005 or higher. Now I just have to find time to figure out the implications of switching to 2005 or 2008. :o)
Hi ,
I have rebulid index on entire database,Update statistics after generate report it show rebuild/reorganise
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
When I try to run Index Statistic report and Index physical statistic it give me error. Error: Incorrect syntax near ‘)’.
What might be the error.
I’m using SSMS 2016. I’m comparing this standard report Index Physical Statistics to the a query result from the function sys.dm_db_index_physical_stats. The results don’t match up. Any idea why? I’m using ‘Detailed’ method on the function. Could the standard report be using another method?