Note
This view is available starting with V4.2.0.
Purpose
This view displays the load balancing jobs that are being executed for all tenants. Each tenant can have only one load balancing job running at a time. Each load balancing job generates multiple load balancing tasks (TASK) to perform the specific operations of load balancing.
Columns
| Column | Type | Nullable | Description |
|---|---|---|---|
| TENANT_ID | bigint(20) | NO | The tenant ID.
|
| JOB_ID | bigint(20) | NO | The ID of the load balancing job. |
| CREATE_TIME | timestamp(6) | NO | The creation time. |
| MODIFY_TIME | timestamp(6) | NO | The time when the information was last updated. |
| BALANCE_STRATEGY | varchar(64) | NO | The name of the balancing strategy.
|
| JOB_TYPE | varchar(64) | NO | The type of the task.
|
| TARGET_UNIT_NUM | bigint(20) | NO | The number of units in each zone that are to be changed.
Note
|
| TARGET_PRIMARY_ZONE_NUM | bigint(20) | NO | The number of primary zones that are to be changed. |
| STATUS | varchar(64) | NO | The status of the task.
|
| COMMENT | longtext | YES | The comment. |
| MAX_END_TIME | timestamp(6) | YES | The maximum end time of the load balancing task.
NoteFor V4.3.x, this view was introduced starting with V4.3.4. For V4.2.x, this column was introduced starting with V4.2.4. |
| ZONE_UNIT_NUM_LIST | varchar(4096) | NO | The number of units in each zone of the tenant.
Note
|
| PARAMETER_LIST | longtext | NO | The parameters of the balancing-related configurations.
Note
|
Sample query
Query the load balancing jobs that are being executed for all tenants.
obclient(root@sys)[oceanbase]> SELECT * FROM oceanbase.CDB_OB_BALANCE_JOBS;
The query result is as follows:
+-----------+---------+----------------------------+----------------------------+------------------------+------------+-----------------+-------------------------+--------+---------+--------------+--------------------+----------------------------------------------------------------------------------------------+
| TENANT_ID | JOB_ID | CREATE_TIME | MODIFY_TIME | BALANCE_STRATEGY | JOB_TYPE | TARGET_UNIT_NUM | TARGET_PRIMARY_ZONE_NUM | STATUS | COMMENT | MAX_END_TIME | ZONE_UNIT_NUM_LIST | PARAMETER_LIST |
+-----------+---------+----------------------------+----------------------------+------------------------+------------+-----------------+-------------------------+--------+---------+--------------+--------------------+----------------------------------------------------------------------------------------------+
| 1008 | 6083968 | 2026-01-16 17:23:18.070731 | 2026-01-16 17:23:18.070731 | LS group count balance | LS_BALANCE | NULL | 2 | DOING | NULL | NULL | z1:2,z2:2,z3:3 | ls_scale_out_factor:1,enable_rebalance:true,enable_transfer:true,enable_gts_standalone:false |
+-----------+---------+----------------------------+----------------------------+------------------------+------------+-----------------+-------------------------+--------+---------+--------------+--------------------+----------------------------------------------------------------------------------------------+
1 row in set
References
Query the history of log stream-level load balancing jobs (Job) for all tenants: CDB_OB_BALANCE_JOB_HISTORY
Query the log stream-level load balancing tasks (Task) for all tenants:
Query the tablet-level load balancing tasks (Task) for all tenants:
Query the Transfer Partition tasks (Task) for all tenants:
For more information about data load balancing, see Data load balancing.