CONSUMER GROUP
Purpose
Use these statements to create, alter, or drop consumer groups.
Prerequisite
You must have the system privileges MANAGE CONSUMER GROUPS
and set any consumer group
.
Syntax
create_consumer_group::=
alter_consumer_group::=
memory_size::=
drop_consumer_group::=
alter_user_set_consumer_group::=
alter_role_set_consumer_group::=
Usage Notes
- Details about consumer groups is available in Resource Manager section.
memory_size
can be either an unsigned integer or a string literal with an unsigned integer, optionally followed by a single-character unit symbol M (megabyte), G (gigabyte), or T (terabyte). There must be no space between the value and the unit symbol. For example:'10G'
is valid, but not'10GB'
or'10 G'
. If a unit is not specified, the value is interpreted as megabyte. To disable the limit, set the attribute to 'OFF'.- The weight of a consumer group has to be between 1 and 1000.
time_in_seconds
is an integer between 1 and 999999. You can set the attribute to 0 to disable the limit.
Examples
CREATE CONSUMER GROUP CEO WITH
PRECEDENCE = 1000,
CPU_WEIGHT = 900;
CREATE CONSUMER GROUP BI_TEAM WITH
PRECEDENCE = 900,
CPU_WEIGHT = 500,
GROUP_TEMP_DB_RAM_LIMIT = '200G',
USER_TEMP_DB_RAM_LIMIT = '100G';
CREATE CONSUMER GROUP TEST_TEAM WITH
PRECEDENCE = 800,
CPU_WEIGHT = 100,
GROUP_TEMP_DB_RAM_LIMIT = '10G',
SESSION_TEMP_DB_RAM_LIMIT = '5G',
QUERY_TIMEOUT = 60,
IDLE_TIMEOUT = 3600;
ALTER CONSUMER GROUP CEO SET
PRECEDENCE = '1000',
CPU_WEIGHT = '800';
ALTER CONSUMER GROUP BI_TEAM SET
PRECEDENCE = '800',
CPU_WEIGHT = '500',
GROUP_TEMP_DB_RAM_LIMIT = '200G',
USER_TEMP_DB_RAM_LIMIT = '100G';
ALTER CONSUMER GROUP TEST_TEAM SET
PRECEDENCE = '800',
CPU_WEIGHT = '150',
GROUP_TEMP_DB_RAM_LIMIT = '10G',
SESSION_TEMP_DB_RAM_LIMIT = '5G',
QUERY_TIMEOUT = 60,
IDLE_TIMEOUT = 3600;