CREATE RESOURCE POOL
Function
CREATE RESOURCE POOL creates a resource pool and specifies the Cgroup for the resource pool.
Precautions
As long as the current user has CREATE permission, it can create a resource pool.
Syntax
1 2 | CREATE RESOURCE POOL pool_name [WITH ({MEM_PERCENT=pct | CONTROL_GROUP="group_name" | ACTIVE_STATEMENTS=stmt | MAX_DOP = dop | MEMORY_LIMIT='memory_size' | io_limits=io_limits | io_priority='priority' | nodegroup='nodegroup_name' | is_foreign = boolean | except_rule='except_rule' | weight=bandwidth_weight | enable_concurrency_scaling=boolean}[, ... ])]; |
Parameter Description
Parameter | Description | Value Range |
|---|---|---|
pool_name | Specifies the name of a resource pool. The name of a resource pool cannot be same as that of an existing resource pool. | A string, which must comply with the identifier naming convention. |
group_name | Specifies the name of a Cgroup. | A string, which must comply with the rules in the description. It specifies the created Cgroup.
|
stmt | Specifies the maximum number of statements that can be concurrently executed in a resource pool. | Numeral type. The value ranges from –1 to INT_MAX. |
dop | Specifies the maximum number of simple SQL statements that can be concurrently executed in a resource pool. | Numeral type. The value ranges from 1 to INT_MAX. |
memory_size | Specifies the estimated maximum memory for a resource pool. | A string.
|
mem_percent | Specifies the proportion of available resource pool memory to the total memory or group user memory. |
|
io_limits | This parameter has been discarded in 8.1.2 and is reserved for compatibility with earlier versions. | - |
io_priority | This parameter has been discarded in 8.1.2 and is reserved for compatibility with earlier versions. | - |
nodegroup | Specifies the name of a logical cluster where the resource pool is. The logical cluster must already exist. | If the logical cluster name contains uppercase letters or special characters or begins with a digit, enclose the name with double quotation marks in SQL statements. |
is_foreign | In logical cluster mode, the current resource pool is used to control the resources of common users who are not associated with the logical cluster specified by nodegroup. |
|
except_rule | Name of an exception rule set | - |
weight | Specifies the network bandwidth weight of the resource pool. | - |
enable_concurrency_scaling | Specifies whether to enable the elastic concurrency expansion function. This function is supported only by clusters of version 9.1.0.100 or later. |
The default value is false. |
Examples
This example assumes that Cgroups have been created by users in advance.
Create a default resource pool, and associate it with the Medium Timeshare Workload Cgroup under DefaultClass.
1 | CREATE RESOURCE POOL pool1; |
Create a resource pool, and associate it with the High Timeshare Workload Cgroup under DefaultClass.
1 | CREATE RESOURCE POOL pool2 WITH (CONTROL_GROUP="High"); |
Create a resource pool, and associate it with the Low Timeshare Workload Cgroup under class1.
1 | CREATE RESOURCE POOL pool3 WITH (CONTROL_GROUP="class1:Low"); |
Create a resource pool, and associate it with the wg1 Workload Cgroup under class1.
1 | CREATE RESOURCE POOL pool4 WITH (CONTROL_GROUP="class1:wg1"); |
Create a resource pool, and associate it with the wg2 Workload Cgroup under class1.
1 | CREATE RESOURCE POOL pool5 WITH (CONTROL_GROUP="class1:wg2:3"); |
Create a resource pool and enable the elastic concurrent expansion function of the resource pool.
1 | CREATE RESOURCE POOL pool6 WITH (enable_concurrency_scaling=true); |
Helpful Links
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.

