Note
This view is introduced since OceanBase Database V3.1.2.
Purpose
The V$RSRC_PLAN view displays the active resource plans on the current OBServer node.
Columns
| Column | Type | Nullable? | Description |
|---|---|---|---|
| ID | decimal(10,0) | NO | The globally unique ID of the resource plan. |
| NAME | varchar(128) | NO | The name of the resource plan. |
| IS_TOP_PLAN | varchar(5) | NO | Indicates whether the current resource plan is the current top-level plan. Valid values: TRUE: The current resource plan is the current top-level plan.FALSE: The current resource plan is a subplan under the current top-level plan.At present, the value of this column is fixed to TRUE in OceanBase Database. |
| CPU_MANAGED | varchar(3) | NO | Indicates whether parameters for managing the CPU utilization have been configured in the current resource plan. Valid values: ON: Yes.OFF: No. At present, the value of this column is fixed to ON in OceanBase Database. |
| INSTANCE_CAGING | varchar(3) | NO | This column is used only for compatibility, and the value is fixed to NULL. |
| PARALLEL_SERVERS_ACTIVE | decimal(10,0) | NO | This column is used only for compatibility, and the value is fixed to NULL. |
| PARALLEL_SERVERS_TOTAL | decimal(10,0) | NO | This column is used only for compatibility, and the value is fixed to NULL. |
| PARALLEL_EXECUTION_MANAGED | varchar(32) | NO | This column is used only for compatibility, and the value is fixed to NULL. |
Sample query
Query the resource management plan of the current active tenant in the sys tenant.
obclient [oceanbase]> SELECT * FROM oceanbase.V$RSRC_PLAN;
The query result is as follows:
+------+---------+-------------+-------------+-----------------+-------------------------+------------------------+----------------------------+
| ID | NAME | IS_TOP_PLAN | CPU_MANAGED | INSTANCE_CAGING | PARALLEL_SERVERS_ACTIVE | PARALLEL_SERVERS_TOTAL | PARALLEL_EXECUTION_MANAGED |
+------+---------+-------------+-------------+-----------------+-------------------------+------------------------+----------------------------+
| NULL | daytime | TRUE | ON | NULL | NULL | NULL | NULL |
+------+---------+-------------+-------------+-----------------+-------------------------+------------------------+----------------------------+
1 row in set