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 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 that is changed. |
| TARGET_PRIMARY_ZONE_NUM | bigint(20) | NO | The number of primary zones that are 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 is available starting with V4.3.4. For V4.2.x, this column is available starting with V4.2.4. |
Sample query
Query the history of load balancing jobs executed on all tenants.
obclient [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 |
+-----------+--------+----------------------------+----------------------------+----------------------+------------+-----------------+-------------------------+-----------+---------+--------------+
| 1002 | 318278 | 2025-05-09 14:29:05.503090 | 2025-05-09 14:29:15.514791 | LS balance by expand | LS_BALANCE | 1 | 2 | COMPLETED | NULL | NULL |
| 1002 | 318453 | 2025-05-09 14:29:45.565764 | 2025-05-09 14:29:55.573005 | LS balance by shrink | LS_BALANCE | 1 | 1 | COMPLETED | NULL | NULL |
| 1002 | 318537 | 2025-05-09 14:30:05.606117 | 2025-05-09 14:30:15.614455 | LS balance by expand | LS_BALANCE | 1 | 2 | COMPLETED | NULL | NULL |
| 1002 | 330209 | 2025-05-09 15:32:39.278774 | 2025-05-09 15:32:49.285956 | LS balance by shrink | LS_BALANCE | 1 | 1 | COMPLETED | NULL | NULL |
| 1002 | 330256 | 2025-05-09 15:32:49.316510 | 2025-05-09 15:33:09.328181 | LS balance by expand | LS_BALANCE | 1 | 2 | COMPLETED | NULL | NULL |
| 1004 | 321371 | 2025-05-09 14:45:15.599930 | 2025-05-09 14:45:25.614648 | LS balance by expand | LS_BALANCE | 1 | 2 | COMPLETED | NULL | NULL |
+-----------+--------+----------------------------+----------------------------+----------------------+------------+-----------------+-------------------------+-----------+---------+--------------+
6 rows in set
References
Query the log stream-level load balancing jobs (jobs) that are 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.