Note
This view was introduced in OceanBase Database V4.2.0.
Purpose
The oceanbase.DBA_OB_BALANCE_JOB_HISTORY view displays the history of all 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 |
| MODIFY_TIME | timestamp(6) | NO | The end time of the job, which can be the time when the job was executed or canceled. |
| BALANCE_STRATEGY | varchar(64) | NO | The name of the load balancing strategy. Valid values:
|
| JOB_TYPE | varchar(64) | NO | The type of the job. Valid values:
|
| TARGET_UNIT_NUM | bigint(20) | NO | The target number of resource units for each zone. |
| TARGET_PRIMARY_ZONE_NUM | bigint(20) | NO | The target number of primary zones. |
| STATUS | varchar(64) | NO | The status of the job. Valid values:
|
| COMMENT | longtext | YES | The comments. |
| MAX_END_TIME | timestamp(6) | YES | The latest end time of the load balancing job.
NoteThis column was introduced in OceanBase Database 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;
Query result:
+--------+----------------------------+----------------------------+----------------------+------------+-----------------+-------------------------+-----------+---------+--------------+
| 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 history of load balancing jobs executed in the current tenant: DBA_OB_BALANCE_JOBS
Query the history of load balancing tasks executed in the current tenant:
Query the history of tablet-level load balancing tasks executed in the current tenant:
Query the history of transfer partition tasks executed in the current tenant:
For more information about data load balancing, see Data load balancing.