Index Utilization Summary Report Script

  • Comments posted to this topic are about the item Index Utilization Summary Report Script

    SQL Server Consultant
    yusufkahveci@sqlturkiye.com
    www.sqlturkiye.com

  • Yusuf,
    Thank you for sharing this script. However I ran into to some problems where it returned way too many rows. The issue is that sys.indexes and sys.objects are database system objects but sys.dm_db_index_usage_stats and sys.dm_db_index_operational_stats cover the entire instance.
    So you can have an object_id appear in multiple databases. I believe the query would need additional conditions in the WHERE clause. Something like:

    AND IUS.database_id= DB_ID()
    AND IOS.database_id= DB_ID()

    That restricts the output to just the current database.

    Thank you again for sharing the script.

    Lee

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

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