从问题来看,
How to find out SQL Server table's read/write statistics?
对我来说最好的答案是由TechCoze提供的:
DECLARE @dbid int
SELECT @dbid = db_id('database_name')
SELECT TableName = object_name(s.object_id),
Reads = SUM(user_seeks + user_scans + user_lookups), Writes = SUM(user_updates)
FROM sys.dm_db_index_usage_stats AS s
INNER JOIN sys.indexes AS i
ON s.object_id = i.object_id
AND i.index_id = s.index_id
WHERE objectproperty(s.object_id,'IsUserTable') = 1
AND s.database_id = @dbid
GROUP BY object_name(s.object_id)
ORDER BY writes DESC
如何在此查询中放置日期过滤器,以便我可以使用日期过滤器监控读取数据?
喜欢2016年4月1日至2016年5月1日