sys.dm_os_memory_cache_clock_hands (Transact-SQL)sys.dm_os_memory_cache_clock_hands (Transact-SQL)
适用于:Applies to: SQL ServerSQL Server(所有支持的版本)
SQL ServerSQL Server (all supported versions)
SQL ServerSQL Server(所有支持的版本)
SQL ServerSQL Server (all supported versions)
返回特定缓存时钟的每个指针的状态。Returns the status of each hand for a specific cache clock.
备注
若要从或调用此 Azure Synapse AnalyticsAzure Synapse Analytics 并行数据仓库Parallel Data Warehouse ,请使用名称 sys.dm_pdw_nodes_os_memory_cache_clock_hands。To call this from Azure Synapse AnalyticsAzure Synapse Analytics or 并行数据仓库Parallel Data Warehouse, use the name sys.dm_pdw_nodes_os_memory_cache_clock_hands.
列名称Column name | 数据类型Data type | 说明Description |
---|---|---|
cache_addresscache_address | varbinary(8)varbinary(8) | 与时钟关联的缓存的地址。Address of the cache associated with the clock. 不可为 null。Is not nullable. |
name name | nvarchar(256)nvarchar(256) | 缓存的名称。Name of the cache. 不可为 null。Is not nullable. |
type type | nvarchar(60)nvarchar(60) | 缓存存储的类型。Type of cache store. 可存在相同类型的多个缓存。There can be several caches of the same type. 不可为 null。Is not nullable. |
clock_handclock_hand | nvarchar(60)nvarchar(60) | 手动类型。Type of hand. 这是以下各项之一:This is one of the following: 外部External 内部Internal 不可为 null。Is not nullable. |
clock_statusclock_status | nvarchar(60)nvarchar(60) | 时钟的状态。Status of the clock. 这是以下各项之一:This is one of the following: 已挂起Suspended 正在运行Running 不可为 null。Is not nullable. |
rounds_countrounds_count | bigintbigint | 通过缓存执行的、旨在删除项的清扫数。Number of sweeps made through the cache to remove entries. 不可为 null。Is not nullable. |
removed_all_rounds_countremoved_all_rounds_count | bigintbigint | 所有清扫删除的项数。Number of entries removed by all sweeps. 不可为 null。Is not nullable. |
updated_last_round_countupdated_last_round_count | bigintbigint | 上次清扫中更新的项数。Number of entries updated during the last sweep. 不可为 null。Is not nullable. |
removed_last_round_countremoved_last_round_count | bigintbigint | 上次清扫中删除的项数。Number of entries removed during the last sweep. 不可为 null。Is not nullable. |
last_tick_timelast_tick_time | bigintbigint | 移动时钟指针的最后时间,以毫秒表示。Last time, in milliseconds, that the clock hand moved. 不可为 null。Is not nullable. |
round_start_timeround_start_time | bigintbigint | 上一次清扫的时间,以毫秒表示。Time, in milliseconds, of the previous sweep. 不可为 null。Is not nullable. |
last_round_start_timelast_round_start_time | bigintbigint | 时钟完成上一往返花费的总时间,以毫秒表示。Total time, in milliseconds, taken by the clock to complete the previous round. 不可为 null。Is not nullable. |
pdw_node_idpdw_node_id | intint | 适用 于: Azure Synapse AnalyticsAzure Synapse Analytics 、 并行数据仓库Parallel Data WarehouseApplies to: Azure Synapse AnalyticsAzure Synapse Analytics, 并行数据仓库Parallel Data Warehouse 此分发所在的节点的标识符。The identifier for the node that this distribution is on. |
权限Permissions
在上 SQL ServerSQL Server ,需要 VIEW SERVER STATE
权限。On SQL ServerSQL Server, requires VIEW SERVER STATE
permission.
在 SQL 数据库的基本、S0 和 S1 服务目标上,对于弹性池中的数据库, 服务器管理员 帐户或 Azure Active Directory 管理员 帐户是必需的。On SQL Database Basic, S0, and S1 service objectives, and for databases in elastic pools, the server admin account or the Azure Active Directory admin account is required. 对于所有其他 SQL 数据库服务目标, VIEW DATABASE STATE
数据库中需要该权限。On all other SQL Database service objectives, the VIEW DATABASE STATE
permission is required in the database.
备注Remarks
SQL ServerSQL Server 将信息存储在内存中一个称为内存缓存的结构中。stores information in memory in a structure called a memory cache. 缓存中的信息可以是数据、索引条目、编译的过程计划以及其他各种类型的 SQL ServerSQL Server 信息。The information in the cache can be data, index entries, compiled procedure plans, and a variety of other types of SQL ServerSQL Server information. 若要避免重新创建信息,尽可能将信息保留在内存缓存中,通常当信息太旧而失去用处或新信息需要使用内存空间时,会将旧信息从缓存中删除。To avoid re-creating the information, it is retained the memory cache as long as possible and is ordinarily removed from the cache when it is too old to be useful, or when the memory space is needed for new information. 删除旧信息的过程称为内存清扫。The process that removes old information is called a memory sweep. 内存清扫是经常执行的操作,但不是连续执行的操作。The memory sweep is a frequent activity, but is not continuous. 时钟算法控制内存缓存的清扫。A clock algorithm controls the sweep of the memory cache. 每个时钟能够控制几个内存清扫,称为指针。Each clock can control several memory sweeps, which are called hands. 内存缓存时钟指针是指一个内存清扫指针的当前位置。The memory-cache clock hand is the current location of one of the hands of a memory sweep.
另请参阅See Also
(Transact-sql 的与操作系统相关的动态管理视图 SQL Server) SQL Server Operating System Related Dynamic Management Views (Transact-SQL)
sys.dm_os_memory_cache_counters (Transact-sql)sys.dm_os_memory_cache_counters (Transact-SQL)