Note
For V4.2.0, this parameter is available starting with V4.2.0.
Description
partition_balance_schedule_interval specifies the interval for partition balancing.
Privilege requirements
Query the parameter
The
systenant and all user tenants can query the parameter by using theSHOW PARAMETERSstatement or theGV$OB_PARAMETERSview.Modify the parameter
The
systenant and user tenants can modify the parameter.
Attributes
| Attribute | Description |
|---|---|
| Type | Time |
| Default value | 0s, which indicates that automatic partition balancing is disabled. |
| Value range | [0s,+∞) |
| 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
Automatic partition balancing is enabled only when the value of the
partition_balance_schedule_intervalparameter is greater than that of the balancer_idle_time parameter.In V4.4.x, the behavior of automatic partition balancing is different:
V4.4.1 and earlier versions
The automatic partition balancing interval is specified by this parameter.
V4.4.1 and later versions
Starting from V4.4.1, scheduled partition balancing tasks are supported. We recommend that you do not use the
partition_balance_schedule_intervalparameter to control partition balancing.For user tenants created in V4.4.1, the value of the
partition_balance_schedule_intervalparameter is 0 by default. Scheduled partition balancing tasks are enabled by default. Partition balancing is triggered by scheduled tasks or manual triggers.For user tenants upgraded from earlier versions to V4.4.1, the value of the
partition_balance_schedule_intervalparameter remains the same as before the upgrade. Scheduled partition balancing tasks are disabled by default.
Examples
Modify the partition balancing interval for all tenants to 1 hour in the
systenant.obclient(root@sys)[oceanbase]> ALTER SYSTEM SET partition_balance_schedule_interval = '1h' tenant = all; obclient(root@sys)[oceanbase]> ALTER SYSTEM SET partition_balance_schedule_interval = '1h' tenant = 'tenant_name';Modify the partition balancing interval for the current tenant to 1 hour in the user tenant.
obclient [test]> ALTER SYSTEM SET partition_balance_schedule_interval = '1h';
