Note
This view is available starting with V4.4.1.
Purpose
The CDB_OB_VECTOR_INDEX_TASK_HISTORY view displays the historical information of vector index partition rebuild tasks for all tenants in the cluster.
Columns
| Column | Data type | Nullable | Description | |
|---|---|---|---|---|
| TENANT_ID | bigint(20) | YES | The tenant ID. | |
| TABLE_ID | bigint(20) | YES | The table ID. | |
| TABLET_ID | bigint(20) | YES | The partition ID. | |
| TASK_ID | bigint(20) | YES | The task ID. | |
| START_TIME | timestamp(6) | YES | The start time of the task. | |
| MODIFY_TIME | timestamp(6) | YES | The end time of the task. | |
| TRIGGER_TYPE | varchar(16) | NO | The type of the task trigger. Valid values:
|
|
| STATUS | varchar(16) | NO | The status of the task. Valid values:
|
|
| TASK_TYPE | bigint(20) | NO | The type of the task. Valid values:
|
|
| TASK_SCN | bigint(20) | NO | The version number of the task. | |
| RET_CODE | bigint(20) | NO | The status of the task at the end of the task. Valid values:
|
|
| TRACE_ID | varchar(512) | NO | The trace ID of the task execution. |
Sample query
In the sys tenant, query the historical information of vector index performance optimization tasks for all tenants.
SELECT * FROM oceanbase.CDB_OB_VECTOR_INDEX_TASK_HISTORY ORDER BY MODIFY_TIME DESC\G;
The query result is as follows:
*************************** 1. row ***************************
TABLE_ID: 500180
TABLET_ID: 1152921504606847128
TASK_ID: 10091
CREATE_TIME: 2026-03-25 23:20:31.475323
MODIFY_TIME: 2026-03-25 23:20:32.484323
TRIGGER_TYPE: AUTO
STATUS: FINISHED
TASK_TYPE: 6
TASK_SCN: 1774452031481903000
RET_CODE: 0
TRACE_ID: Y2C277F000001-00064DDA40B0F2AE-0-1
TASK_INFO: {"merge_segments_cnt":2,"merge_segments":[{"scn":1774451941331810002,"start_key":"1152921504606847129_1774451941331810002_hnsw_data_part00000","end_key":"1152921504606847129_1774451941331810002_hnsw_data_part00000","index_type":"HNSW","vector_cnt":"1005","mem_used":"252512","mem_hold":"252512","min_vid":"11","max_vid":"10005"},{"scn":1774452021463248000,"start_key":"1152921504606847129_1774452021463248000_hgraph_data_part00000","end_key":"1152921504606847129_1774452021463248000_hgraph_data_part00002","index_type":"HGRAPH","vector_cnt":"1000","mem_used":"8484032","mem_hold":"8484032","min_vid":"1011","max_vid":"2010"}],"result_segments":[{"scn":1774452031481903000,"start_key":"1152921504606847129_1774452031481903000_hnsw_data_part00000","end_key":"1152921504606847129_1774452031481903000_hnsw_data_part00000","index_type":"HNSW","vector_cnt":"2005","mem_used":"803354","mem_hold":"0","min_vid":"11","max_vid":"10005"}]}
EXEC_ADDR: NULL
PRIORITY: 0
START_TIME: NULL
END_TIME: NULL
ERR_MSG: NULL
1 row in set
References
- DBA_OB_VECTOR_INDEX_TASK_HISTORY
- For the relationship between HNSW vector index dump, major compaction, and task types, see Vector index principles.
- For O&M and manual trigger instructions, see Monitor and maintain vector indexes.
