Note
This view is available starting with V4.2.0.
Purpose
This view displays the history of load balancing jobs executed on all tenants.
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 time when the job was created. |
| FINISH_TIME | timestamp(6) | NO | The time when the job was completed, including the time when the job was successfully executed or canceled. |
| 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 to be changed.
Note
|
| TARGET_PRIMARY_ZONE_NUM | bigint(20) | NO | The number of primary zones to be changed. |
| STATUS | varchar(64) | NO | The status of the task.
|
| COMMENT | longtext | YES | The comment. |
| MAX_END_TIME | timestamp(6) | YES | The latest end time of the load balancing task.
NoteFor V4.3.x, this view was introduced starting from V4.3.4. For V4.2.x, this column was introduced starting from 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 history of load balancing jobs executed on all tenants.
obclient(root@sys)[oceanbase]> SELECT * FROM oceanbase.CDB_OB_BALANCE_JOB_HISTORY;
The query result is as follows:
+-----------+---------+----------------------------+----------------------------+-------------------------+------------+-----------------+-------------------------+-----------+--------------------------------------------------------------------------------+--------------+--------------------+----------------------------------------------------------------------------------------------+
| TENANT_ID | JOB_ID | CREATE_TIME | FINISH_TIME | BALANCE_STRATEGY | JOB_TYPE | TARGET_UNIT_NUM | TARGET_PRIMARY_ZONE_NUM | STATUS | COMMENT | MAX_END_TIME | ZONE_UNIT_NUM_LIST | PARAMETER_LIST |
+-----------+---------+----------------------------+----------------------------+-------------------------+------------+-----------------+-------------------------+-----------+--------------------------------------------------------------------------------+--------------+--------------------+----------------------------------------------------------------------------------------------+
| 1008 | 6038754 | 2026-01-16 13:48:52.919970 | 2026-01-16 13:49:23.124313 | unit list balance | LS_BALANCE | NULL | 1 | COMPLETED | NULL | NULL | z1:2,z2:2,z3:3 | ls_scale_out_factor:1,enable_rebalance:true,enable_transfer:true,enable_gts_standalone:false |
| 1008 | 6039266 | 2026-01-16 13:50:43.491205 | 2026-01-16 13:50:53.539887 | LS count balance | LS_BALANCE | NULL | 2 | COMPLETED | NULL | NULL | z1:2,z2:2,z3:3 | ls_scale_out_factor:1,enable_rebalance:true,enable_transfer:true,enable_gts_standalone:false |
| 1008 | 6041716 | 2026-01-16 14:00:35.214859 | 2026-01-16 14:01:05.369658 | LS group count balance | LS_BALANCE | NULL | 2 | COMPLETED | NULL | NULL | z1:2,z2:2 | ls_scale_out_factor:1,enable_rebalance:true,enable_transfer:true,enable_gts_standalone:false |
+-----------+---------+----------------------------+----------------------------+-------------------------+------------+-----------------+-------------------------+-----------+--------------------------------------------------------------------------------+--------------+--------------------+----------------------------------------------------------------------------------------------+
3 rows in set
References
Query the log stream-level load balancing jobs (Jobs) currently being executed on all tenants: CDB_OB_BALANCE_JOBS
Query the log stream-level load balancing tasks (Tasks) on all tenants:
Query the tablet-level load balancing tasks (Tasks) on all tenants:
Query the Transfer Partition tasks (Tasks) on all tenants:
For more information about data load balancing, see Data load balancing.