I have partitioned my table by a date column into 10 partitions and would like to see how EACH partition is getting used (I/O stats, etc.). I would hope this would give some insight into how the existing queries are using individual partitions, if at all, so that I might optimize the queries. Is there a way of determining the I/O stats AT THE PARTITION LEVEL?
Few approaches:
But it will work only in case if every partition resides in own filegroup
This DMV can provide data structure usage stats per object/index/partition:
sys.dm_db_index_operational_stats (
{ database_id | NULL | 0 | DEFAULT }
, { object_id | NULL | 0 | DEFAULT }
, { index_id | 0 | NULL | -1 | DEFAULT }
, { partition_number | NULL | 0 | DEFAULT }
)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.