Updated on 2024-06-03 GMT+08:00

GS_WORKLOAD_RULE_STAT

GS_WORKLOAD_RULE_STAT displays information about SQL concurrency control rules. Only the sysadmin user can access the system view.

Table 1 GS_WORKLOAD_RULE_STAT columns

Name

Type

Description

rule_id

bigint

Concurrency control rule ID.

rule_name

name

Name of a concurrency control rule, which is used to search for the concurrency control rule.

databases

name[]

List of databases on which the concurrency control rules take effect. If the value is NULL, the concurrency control rules take effect for all databases.

rule_type

text

Concurrency control rule type. Currently, only "sqlid", "select", "insert", "update", "delete", "merge", and "resource" are supported. Other values are invalid.

start_time

timestamp with time zone

Start time of the concurrency control rules. The value NULL indicates that the rules take effect from now on.

end_time

timestamp with time zone

End time of the concurrency control rules. The value NULL indicates that the rules are always effective.

max_workload

bigint

Maximum number of concurrent rule settings.

option_val

text[]

Parameter values of a concurrency control rule, including SQL ID, keyword list, and resource restriction.

For details, see gs_add_workload_rule(rule_type, rule_name, databases, start_time, end_time, max_workload, option_val).

is_valid

Boolean

Determines whether the concurrency control rules take effect. If the concurrency control rules time out, the value is set to false.

validate_count

bigint

Number of SQL statements intercepted by the concurrency control rule.

node_names

text[]

List of nodes on which the concurrency control rules take effect. This parameter is reserved and does not take effect currently.

user_names

text[]

List of users for which the concurrency control rules take effect. This parameter is reserved and does not take effect currently.