The DBMS_BALANCE system package provides methods for partition balancing.
Privilege requirements
A user tenant with the privilege to execute PL/SQL statements can use this feature. The sys tenant will receive an error OB_OP_NOT_ALLOW when calling this feature.
Subprograms
The following table describes the subprograms supported by OceanBase Database in the DBMS_BALANCE package.
| Subprogram | Description |
|---|---|
| TRIGGER_PARTITION_BALANCE | Triggers manual partition balancing. |
| SET_BALANCE_WEIGHT | Sets the partition weight manually. |
| CLEAR_BALANCE_WEIGHT | Clears the partition weight manually. |
| SET_TABLEGROUP_BALANCE_WEIGHT | Sets the load balancing weight for a SHARDING NONE tablegroup. |
| CLEAR_TABLEGROUP_BALANCE_WEIGHT | Clears the load balancing weight for a SHARDING NONE tablegroup. |