CREATE RESOURCE GROUP statement creates a resource group, which sets the share of CPU that a workload receives when CPU is contended.
To use CREATE RESOURCE GROUP, you must first enable resource groups.
Required privileges
Only members of theadmin role can create resource groups.
Synopsis
Parameters
Options
Examples
Create a resource group
The following statement creates a resource group namedreporting with a CPU weight of 100:
oltp with a larger weight. Set max_cpu so that the group stays in the burst tier when it uses more than its share:
SHOW RESOURCE GROUPS:
Create a resource group only if it does not exist
The following statement does nothing, because a resource group namedreporting already exists:
IF NOT EXISTS, the statement returns an error:
Assign sessions to a new resource group
After you create a resource group, assign sessions to it with theresource_group session variable. The following statement assigns all future sessions of the report_user role to the reporting group:

