Note
This view is introduced since OceanBase Database V3.2.4.
Purpose
The oceanbase.DBA_RSRC_CONSUMER_GROUPS view displays information about all resource groups in the database.
Columns
| Column | Type | Nullable? | Description |
|---|---|---|---|
| CONSUMER_GROUP_ID | bigint(20) | NO | The ID of the resource group. |
| CONSUMER_GROUP | varchar(128) | NO | The name of the resource group that the user is bound to. |
| CPU_METHOD | varchar(128) | NO | It is used only for compatibility and the value is fixed to NULL. |
| MGMT_METHOD | varchar(128) | NO | It is used only for compatibility and the value is fixed to NULL. |
| INTERNAL_USE | varchar(3) | NO | Indicates whether the resource group is only for internal use. It is used only for compatibility and the value is fixed to NULL. |
| COMMENTS | varchar(2000) | YES | The comments on the resource group. |
| CATEGORY | varchar(128) | NO | The category of the resource group. It is used only for compatibility and the value is fixed to NULL. |
| STATUS | varchar(128) | NO | The status of the resource group. It is used only for compatibility and the value is fixed to NULL. |
| MANDATORY | varchar(3) | NO | Indicates whether the resource group is required. It is used only for compatibility and the value is fixed to NULL. |
Sample query
To query information about all resource groups in the current tenant, execute the following statement:
obclient [oceanbase]> SELECT CONSUMER_GROUP_ID, CONSUMER_GROUP FROM oceanbase.DBA_RSRC_CONSUMER_GROUPS;
The query result is as follows:
+-------------------+-------------------+
| CONSUMER_GROUP_ID | CONSUMER_GROUP |
+-------------------+-------------------+
| 10001 | batch_group |
| 10000 | interactive_group |
+-------------------+-------------------+
2 rows in set
References
For more information about the binding relationship between users and resource groups, see oceanbase.DBA_RSRC_GROUP_MAPPINGS.