The CREATE_PLAN_DIRECTIVE procedure creates a resource plan directive.
Applicability
This topic applies only to OceanBase Database Enterprise Edition. OceanBase Database Community Edition provides only the MySQL mode.
Syntax
DBMS_RESOURCE_MANAGER.CREATE_PLAN_DIRECTIVE (
plan IN VARCHAR2,
group_or_subplan IN VARCHAR2,
comment IN VARCHAR2 DEFAULT'',
mgmt_p1 IN NUMBER DEFAULT 100,
utilization_limit IN NUMBER DEFAULT 100,
MIN_IOPS IN NUMBER DEFAULT 0,
MAX_IOPS IN NUMBER DEFAULT 100,
WEIGHT_IOPS IN NUMBER DEFAULT 0,
);
Parameters
| Parameter | Description |
|---|---|
| plan | The name of the resource plan. |
| group_or_subplan | The name of the resource consumer group or subplan. |
| comment | The comments on the plan directive. |
| mgmt_p1 | The percentage of CPU resources allocated to the resource consumer group when the system runs at full load. |
| utilization_limit | The maximum CPU utilization allowed. Value range: [0,100]. The value 100 indicates that all CPU resources of the tenant can be used. The value 20 indicates that at most 20% of the CPU resources of the tenant can be used. |
| MIN_IOPS | The percentage of IOPS resources reserved for I/O contention. The sum of MIN_IOPS of all directives cannot exceed 100. Default value: 0. |
| MAX_IOPS | The maximum percentage of IOPS resources. The sum of MAX_IOPS of all directives may exceed 100. Default value: 100. |
| WEIGHT_IOPS | The weight of IOPS resources in the case of I/O contention. The sum of WEIGHT_IOPS of all directives may be greater than 100, and the weights will be normalized. Default value: 0. |
Examples
obclient> CALL DBMS_RESOURCE_MANAGER.CREATE_PLAN_DIRECTIVE(
PLAN=>'DAY',
GROUP_OR_SUBPLAN=>'group1',
mgmt_p1=>80,
utilization_limit=>100);
Query OK, 0 rows affected
obclient> CALL DBMS_RESOURCE_MANAGER.CREATE_PLAN_DIRECTIVE(
PLAN=>'NIGHT',
GROUP_OR_SUBPLAN=>'group2',
mgmt_p1=>20,
utilization_limit=>40);
Query OK, 0 rows affected
obclient> CALL DBMS_RESOURCE_MANAGER.CREATE_PLAN_DIRECTIVE(
PLAN => 'daytime',
GROUP_OR_SUBPLAN => 'interactive_group' ,
MGMT_P1 => 30,
UTILIZATION_LIMIT =>80,
MIN_IOPS => 30,
MAX_IOPS => 90,
WEIGHT_IOPS => 80);
Query OK, 0 rows affected