Note
This parameter is available starting with V4.2.0.
Description
The partition_balance_schedule_interval parameter specifies the partition balance schedule interval.
Privilege requirements
Query the parameter
The
systenant and all user tenants can query thepartition_balance_schedule_intervalparameter by using theSHOW PARAMETERSstatement or theGV$OB_PARAMETERSview.Modify the parameter
The
systenant and user tenant can modify thepartition_balance_schedule_intervalparameter.
Attributes
| Attribute | Description |
|---|---|
| Type | Time |
| Default value | 2h
Note
|
| Value range | [0s,+∞)
NoteIf the value is set to 0s, background auto-partition balancing is disabled. |
| Modifiable | Yes. You can use the ALTER SYSTEM SET statement to modify the parameter. |
| Effective upon OBServer node restart | No. The setting takes effect immediately. |
Considerations
To enable auto-partition balancing, set the
partition_balance_schedule_intervalparameter to a value greater than that of the balancer_idle_time parameter.In V4.2.x versions other than V4.2.1, the behavior of auto-partition balancing differs from that of earlier versions:
Versions earlier than V4.2.4
The auto-partition balancing interval is controlled by the
partition_balance_schedule_intervalparameter.V4.2.4 and later versions
Starting from V4.2.4, you can use scheduled partition balancing tasks instead of using the
partition_balance_schedule_intervalparameter. For user tenants created in V4.2.4, thepartition_balance_schedule_intervalparameter is set to 0 by default, and the scheduled partition balancing task is enabled by default. For auto-partition balancing, it depends on the scheduled partition balancing tasks and manual triggers.For user tenants upgraded from earlier versions to V4.2.4, the
partition_balance_schedule_intervalparameter has the same value as it did before the upgrade, and the scheduled partition balancing task is disabled by default.
Examples
Example 1: Modify only the
partition_balance_schedule_intervalparameter in a user tenant.obclient [test]> ALTER SYSTEM SET partition_balance_schedule_interval = '1h';Example 2: Modify the
partition_balance_schedule_intervalparameter in the system tenant.obclient [test]> ALTER SYSTEM SET partition_balance_schedule_interval = '1h' tenant = all; obclient [test]> ALTER SYSTEM SET partition_balance_schedule_interval = '1h' tenant = 'tenant_name';