Note
This view is available starting with V4.2.0.
Purpose
This view displays the history of load balancing jobs executed in the current tenant.
Columns
| Column | Type | Nullable? | Description |
|---|---|---|---|
| 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 it 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 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 maximum 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 all load balancing jobs executed in the current tenant.
obclient [oceanbase]> SELECT * FROM oceanbase.DBA_OB_BALANCE_JOB_HISTORY;
The query result is as follows:
+--------+----------------------------+----------------------------+----------------------+------------+-----------------+-------------------------+-----------+---------+--------------+
| JOB_ID | CREATE_TIME | FINISH_TIME | BALANCE_STRATEGY | JOB_TYPE | TARGET_UNIT_NUM | TARGET_PRIMARY_ZONE_NUM | STATUS | COMMENT | MAX_END_TIME |
+--------+----------------------------+----------------------------+----------------------+------------+-----------------+-------------------------+-----------+---------+--------------+
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
+--------+----------------------------+----------------------------+----------------------+------------+-----------------+-------------------------+-----------+---------+--------------+
5 rows in set
References
Query the log stream-based load balancing jobs (jobs) that are being executed in the current tenant: DBA_OB_BALANCE_JOBS
Query the log stream-based load balancing tasks (tasks) in the current tenant:
Query the tablet-based load balancing tasks (tasks) in the current tenant:
Query the transfer partition tasks (tasks) in the current tenant:
For more information about data load balancing, see Data load balancing.