Note
For V4.2.0, this parameter is available starting with V4.2.0.
Description
partition_balance_schedule_interval specifies the partition balance schedule interval.
Privilege requirements
Query the parameter
The
systenant and all user tenants can query this parameter by using theSHOW PARAMETERSstatement or theGV$OB_PARAMETERSview.Modify the parameter
The
systenant and user tenants can modify this parameter.
Attributes
| Attribute | Description |
|---|---|
| Type | Time |
| Default value | 0s, which indicates that the background automatic partition balance 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
You can enable partition balance 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 partition balance is different:
V4.4.1 and earlier versions
The automatic partition balance interval is controlled by this parameter.
V4.4.1 and later versions
Starting from V4.4.1, scheduled partition balance tasks are supported. We recommend that you do not use the
partition_balance_schedule_intervalparameter to control partition balance.For user tenants created in V4.4.1, the value of the
partition_balance_schedule_intervalparameter is 0 by default. Scheduled partition balance tasks are enabled by default. Partition balance is triggered by scheduled tasks or manual triggers.For user tenants upgraded to V4.4.1, the value of the
partition_balance_schedule_intervalparameter remains unchanged from before the upgrade. Scheduled partition balance tasks are disabled by default.
Examples
Change the partition balance schedule interval of any tenant in the
systenant to 1 hour.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';Change the partition balance schedule interval of the current user tenant to 1 hour.
obclient [test]> ALTER SYSTEM SET partition_balance_schedule_interval = '1h';