• 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