sys.dm_os_memory_cache_entries (Transact-SQL)


THIS TOPIC APPLIES TO:yesSQL Server (starting with 2008)noAzure SQL DatabaseyesAzure SQL Data Warehouse yesParallel Data Warehouse

Returns information about all entries in caches in SQL Server. Use this view to trace cache entries to their associated objects. You can also use this view to obtain statistics on cache entries.

System_CAPS_ICON_note.jpg Note

To call this from Azure SQL Data Warehouse or Parallel Data Warehouse, use the name sys.dm_pdw_nodes_os_memory_cache_entries.

Column nameData typeDescription
cache_addressvarbinary(8)Address of the cache. Is not nullable.
namenvarchar(256)Name of the cache. Is not nullable.
typevarchar(60)Type of cache. Is not nullable.
entry_addressvarbinary(8)Address of the descriptor of the cache entry. Is not nullable.
entry_data_addressvarbinary(8)Address of the user data in the cache entry.

0x00000000 = Entry data address is not available.

Is not nullable.
in_use_countintNumber of concurrent users of this cache entry. Is not nullable.
is_dirtybitIndicates whether this cache entry is marked for removal. 1 = marked for removal. Is not nullable.
disk_ios_countintNumber of I/Os incurred while this entry was created. Is not nullable.
context_switches_countintNumber of context switches incurred while this entry was created. Is not nullable.
original_costintOriginal cost of the entry. This value is an approximation of the number of I/Os incurred, CPU instruction cost, and the amount of memory consumed by entry. The greater the cost, the lower the chance that the item will be removed from the cache. Is not nullable.
current_costintCurrent cost of the cache entry. This value is updated during the process of entry purging. Current cost is reset to its original value on entry reuse. Is not nullable.
memory_object_addressvarbinary(8)Address of the associated memory object. Is nullable.
pages_allocated_countbigintApplies to: SQL Server 2008 through SQL Server 2008 R2.

Number of 8-KB pages to store this cache entry. Is not nullable.
pages_kbbigintApplies to: SQL Server 2012 through SQL Server 2016.

Amount of memory in kilobytes (KB) used by this cache entry. Is not nullable.
entry_datanvarchar(2048)Serialized representation of the cached entry. This information is cache store dependant. Is nullable.
pool_idintApplies to: SQL Server 2008 R2 through SQL Server 2016.

Resource pool id associated with entry. Is nullable.

not katmai
pdw_node_idintApplies to: Azure SQL Data Warehouse, Parallel Data Warehouse

The identifier for the node that this distribution is on.

Requires VIEW SERVER STATE permission on the server.

Dynamic Management Views and Functions (Transact-SQL)
SQL Server Operating System Related Dynamic Management Views (Transact-SQL)

Community Additions