Note
This view was introduced in OceanBase Database V4.2.0.
Purpose
The oceanbase.CDB_OB_BALANCE_JOB_HISTORY view displays the historical load balancing jobs of all tenants.
Columns
| Column | Type | Nullable? | Description |
|---|---|---|---|
| TENANT_ID | bigint(20) | NO | The ID of the tenant. Valid values:
|
| 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 historical load balancing jobs of all tenants.
obclient [oceanbase]> SELECT * FROM oceanbase.CDB_OB_BALANCE_JOB_HISTORY;
Query result:
+-----------+--------+----------------------------+----------------------------+----------------------+------------+-----------------+-------------------------+-----------+---------+--------------+
| 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
View all log stream-level load balancing jobs (Job) for current tenants: CDB_OB_BALANCE_JOBS
View all log stream-level load balancing tasks (Task) for tenants:
View all tablet-level load balancing tasks (Task) for tenants:
View all transfer partition tasks (Task) for tenants:
For more information about data load balancing, see Data load balancing.