Page counts are always at the extent level. Therefore, page count values will always be a multiple of eight. The extents that contain Global Allocation Map (GAM) and Shared Global Allocation Map (SGAM) allocation pages are allocated uniform extents. They are not included in the previously described page counts.
The content of the current version store is in sys.dm_tran_version_store. Version store pages are tracked at the file level instead of the session and task level, because they are global resources. A session may generate versions, but the versions cannot be removed when the session ends. Version store cleanup must consider the longest running transaction that needs access to the particular version. The longest running transaction related to version store clean-up can be discovered by viewing the elapsed_time_seconds column in sys.dm_tran_active_snapshot_database_transactions.
Frequent changes in the mixed_extent_page_count column may indicate heavy use of SGAM pages. When this occurs, you may see many PAGELATCH_UP waits in which the wait resource is an SGAM page. For more information, see sys.dm_os_waiting_tasks (Transact-SQL), sys.dm_os_wait_stats (Transact-SQL), and sys.dm_os_latch_stats (Transact-SQL). For more information about SGAM pages, see Managing Extent Allocations and Free Space.
User Objects
The following objects are included in the user object page counters:
-
User-defined tables and indexes
-
System tables and indexes
-
Global temporary tables and indexes
-
Local temporary tables and indexes
-
Table variables
-
Tables returned in the table-valued functions
Internal Objects
Internal objects are only in tempdb. The following objects are included in the internal object page counters:
-
Work tables for cursor or spool operations and temporary large object (LOB) storage
-
Work files for operations such as a hash join
-
Sort runs
Relationship Cardinalities
|
From
|
To
|
Relationship
|
|---|
|
sys.dm_db_file_space_usage.database_id, file_id
|
sys.dm_io_virtual_file_stats.database_id, file_id
|
One-to-one
|