sys.resource_governor_workload_groups (Transact-SQL)sys.resource_governor_workload_groups (Transact-SQL)

适用对象:是SQL Server 否Azure SQL 数据库 否Azure Synapse Analytics (SQL DW) 否并行数据仓库 APPLIES TO: yesSQL Server noAzure SQL Database noAzure Synapse Analytics (SQL DW) noParallel Data Warehouse

返回 SQL ServerSQL Server 中的存储工作负荷组配置。Returns the stored workload group configuration in SQL ServerSQL Server. 每个工作负荷组都可以订阅一个且只能订阅一个资源池。Each workload group can subscribe to one and only one resource pool.

列名称Column name 数据类型Data type 说明Description
group_idgroup_id intint 工作负荷组的唯一 ID。Unique ID of the workload group. 不可为 null。Is not nullable.
namename sysnamesysname 工作负荷组的名称。Name of the workload group. 不可为 null。Is not nullable.
importanceimportance sysnamesysname 注意: 重要性仅适用于同一资源池中的工作负荷组。Note: Importance only applies to workload groups in the same resource pool.

此工作负荷组中的请求的相对重要性。Is the relative importance of a request in this workload group. 重要性为下列值之一,默认值为:低、中、高。Importance is one of the following, with MEDIUM being the default: LOW, MEDIUM, HIGH.

不可为 null。Is not nullable.
request_max_memory_grant_percentrequest_max_memory_grant_percent intint 授予单个请求的最大内存量(以百分比表示)。Maximum memory grant, as a percentage, for a single request. 默认值为 25。The default value is 25. 不可为 null。Is not nullable.

注意: 如果此设置大于50%,则大型查询一次运行一个。Note: If this setting is higher than 50 percent, large queries will run one at a time. 因此,在查询正在运行时出现内存不足错误的风险更高。Therefore, there is greater risk of getting an out-of-memory error while the query is running.
request_max_cpu_time_secrequest_max_cpu_time_sec intint 针对单个请求的最大 CPU 使用限制(以秒为单位)。Maximum CPU use limit, in seconds, for a single request. 默认值为 0,指定没有限制。The default value, 0, specifies no limit. 不可为 null。Is not nullable.

注意: 有关详细信息,请参阅CPU 阈值超出事件类别Note: For more information, see CPU Threshold Exceeded Event Class.
request_memory_grant_timeout_secrequest_memory_grant_timeout_sec intint 针对单个请求的内存授予超时(以秒为单位)。Memory grant time-out, in seconds, for a single request. 默认值为 0,表示使用基于查询开销的内部计算。The default value, 0, uses an internal calculation based on query cost. 不可为 null。Is not nullable.
max_dopmax_dop intint 工作负荷组的最大并行度。Maximum degree of parallelism for the workload group. 默认值为 0,表示使用全局设置。The default value, 0, uses global settings. 不可为 null。Is not nullable.

Node: 此设置将替代查询选项maxdopNode: This setting will override the query option maxdop.
group_max_requestsgroup_max_requests intint 最大并发请求数。Maximum number of concurrent requests. 默认值为 0,指定没有限制。The default value, 0, specifies no limit. 不可为 null。Is not nullable.
pool_idpool_id intint 此工作负荷组使用的资源池的 ID。ID of the resource pool that this workload group uses.
external_pool_idexternal_pool_id intint 适用于SQL Server 2016 (13.x)SQL Server 2016 (13.x) 及更高版本。Applies to: SQL Server 2016 (13.x)SQL Server 2016 (13.x) and later.

此工作负荷组使用的外部资源池的 ID。ID of the external resource pool that this workload group uses.

备注Remarks

目录视图显示存储的元数据。The catalog view displays the stored metadata. 若要查看内存中的配置,请使用对应的动态管理视图(transact-sql)dm_resource_governor_workload_groups To see the in-memory configuration, use the corresponding dynamic management view, sys.dm_resource_governor_workload_groups (Transact-SQL).

如果资源调控器配置已发生更改,但尚未应用 ALTER RESOURCE GOVERNOR RECONFIGURE 语句,则存储的配置和内存中的配置可能会不同。The stored and in-memory configuration can be different if the Resource Governor configuration has been changed but the ALTER RESOURCE GOVERNOR RECONFIGURE statement has not been applied.

权限Permissions

若要查看内容,则需要拥有 VIEW ANY DEFINITION 权限;若要更改内容,则需要拥有 CONTROL SERVER 权限。Requires VIEW ANY DEFINITION permission to view contents, requires CONTROL SERVER permission to change contents.

另请参阅See Also

sys. dm_resource_governor_workload_groups (Transact-sql) sys.dm_resource_governor_workload_groups (Transact-SQL)
目录视图 (Transact-SQL) Catalog Views (Transact-SQL)
Resource Governor 目录视图 (Transact-sql)Resource Governor Catalog Views (Transact-SQL)