Hi,
I'm looking for DPA to tell me the busiest tables in my DB. I know I can do it with the query below, but I am not sure how to integrate that with DPA. I don't want to set up an alert as I don't have a preferred minimum or maximum, I just need information about usage.
SELECT
DB_NAME(ius.database_id)+'.'+t.NAME AS TableName,
SUM(ius.user_seeks + ius.user_scans + ius.user_lookups + ius.user_updates) AS NbrTimesAccessed
FROM
sys.dm_db_index_usage_stats AS ius
INNER JOIN sys.tables AS t ON t.OBJECT_ID = ius.object_id
GROUP BY
database_id,
t.name
ORDER BY
NbrTimesAccessed DESC;
Any ideas of how we can integrate that info?
Thank you