January 8, 2018 at 1:06 pm
Comments posted to this topic are about the item Index Utilization Summary Report Script
SQL Server Consultant
yusufkahveci@sqlturkiye.com
www.sqlturkiye.com
June 20, 2018 at 8:29 am
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
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy