sys.dm_db_partition_stats Returns page and row-count information for every partition in the current database.
in_row_data_page_count:Number of pages in use for storing in-row data in this partition. If the partition is part of a heap, the value is the number of data pages in the heap. If the partition is part of an index, the value is the number of pages in the leaf level. (Nonleaf pages in the B-tree are not included in the count.) IAM (Index Allocation Map) pages are not included in either case. Always 0 for an xVelocity memory optimized columnstore index.
in_row_used_page_count:Total number of pages in use to store and manage the in-row data in this partition. This count includes nonleaf B-tree pages, IAM pages, and all pages included in the in_row_data_page_count column. Always 0 for a columnstore index.
in_row_reserved_page_count:Total number of pages reserved for storing and managing in-row data in this partition, regardless of whether the pages are in use or not. Always 0 for a columnstore index.
select ps.partition_id, ps.object_id, ps.index_id, ps.partition_number, ps.in_row_data_page_count, ps.in_row_used_page_count, ps.in_row_reserved_page_count, ps.lob_used_page_count, ps.lob_reserved_page_count, ps.row_overflow_used_page_count, ps.row_overflow_reserved_page_count, ps.used_page_count, ps.reserved_page_count, ps.row_count from sys.dm_db_partition_stats ps inner join sys.objects o on ps.object_id=o.object_id where o.name=N‘Users‘
参考文档:
sys.dm_db_partition_stats (Transact-SQL)