Skip to main content
Version: Latest-3.2

SHOW RESOURCE GROUP

Description

Shows the information of resource groups.

tip

This operation does not require privileges.

Syntax

SHOW { RESOURCE GROUPS [ALL] | RESOURCE GROUP <resource_group_name> }

Parameters

ParameterDescription
RESOURCE GROUPSShow the resource groups that match the current user.
ALLSpecify this parameter to show all resource groups in the cluster.
RESOURCE GROUPShow the specified resource group.
resource_group_nameName of the resource group to be shown.

Return

ReturnDescription
nameName of the resource group.
idID of the resource group.
cpu_core_limitCPU core limit of the resource group.
mem_limitMemory limit of the resource group.
big_query_cpu_second_limitBig query upper time limit of the resource group.
big_query_scan_rows_limitBig query scan row limit of the resource group.
big_query_mem_limitBig query memory limit of the resource group.
concurrency_limitConcurrency limit of the resource group.
typeType of resource group.
classifiersClassifiers that are associated with the resource group. id is the ID of the classifier, and weight is the degree of matching.

Examples

Example 1: Shows all resource groups in the cluster.

mysql> SHOW RESOURCE GROUPS ALL;
+-------+--------+----------------+-----------+----------------------------+---------------------------+---------------------+-------------------+--------+------------------------------------------------------------------------------------------------------------------+
| name | id | cpu_core_limit | mem_limit | big_query_cpu_second_limit | big_query_scan_rows_limit | big_query_mem_limit | concurrency_limit | type | classifiers |
+-------+--------+----------------+-----------+----------------------------+---------------------------+---------------------+-------------------+--------+------------------------------------------------------------------------------------------------------------------+
| rg1 | 625126 | 10 | 20.0% | 100 | 100000 | 1073741824 | null | NORMAL | (id=625127, weight=4.459375, user=rg1_user1, role=rg1_role1, query_type in (SELECT), source_ip=172.26.xxx.xx/24) |
| rg1 | 625126 | 10 | 20.0% | 100 | 100000 | 1073741824 | null | NORMAL | (id=625128, weight=3.459375, user=rg1_user2, query_type in (SELECT), source_ip=172.26.xxx.xx/24) |
| rg1 | 625126 | 10 | 20.0% | 100 | 100000 | 1073741824 | null | NORMAL | (id=625129, weight=2.359375, user=rg1_user3, source_ip=172.26.xxx.xx/24) |
| rg1 | 625126 | 10 | 20.0% | 100 | 100000 | 1073741824 | null | NORMAL | (id=625130, weight=1.0, user=rg1_user4) |
| rg1 | 625126 | 10 | 20.0% | 100 | 100000 | 1073741824 | null | NORMAL | (id=625131, weight=10.0, db='db1') |
+-------+--------+----------------+-----------+----------------------------+---------------------------+---------------------+-------------------+--------+------------------------------------------------------------------------------------------------------------------+