Note
This view is available starting with V4.4.1.
Purpose
The DBA_OB_VECTOR_INDEX_TASK_HISTORY view displays the historical information of vector index partition rebuild tasks in the current tenant.
Columns
| Column | Data type | Nullable | Description |
|---|---|---|---|
| TABLE_ID | bigint(20) | YES | The ID of the table. |
| TABLET_ID | bigint(20) | YES | The ID of the partition. |
| TASK_ID | bigint(20) | YES | The ID of the task. |
| 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. Valid values:
|
| TRACE_ID | varchar(512) | NO | The trace ID of the task. |
| TASK_INFO | long text | NO | The detailed progress information of the task. This field displays the information in JSON format. The information includes the details of each segment for a major compaction task, such as the SCN, key range, index, and memory usage of each segment. This way, you can comprehensively understand the execution process of the task. |
Sample query
In the sys tenant, query the historical information of vector index performance optimization tasks of all tenants.
SELECT * FROM oceanbase.DBA_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
The following table describes the JSON string in the TASK_INFO field.
| Column | JSON data type | Description |
|---|---|---|
| merge_segments_cnt | string | The number of segments to be merged. |
| merge_segments | array | The information of the segments to be merged. The number of elements in this array is the same as that in the merge_segments_cnt field. |
| result_segments | array | The information of the merged segments. |
| scn | string | The internal timestamp. |
| start_key | string | The upper bound of the storage range of the segment. |
| end_key | string | The lower bound of the storage range of the segment. |
| index_type | string | The index type used for vector processing. Valid values:
|
| mem_used | string | The memory used by the segment. |
| min_vid | string | The minimum vector ID of the segment. |
| max_vid | string | The maximum vector ID of the segment. |
References
- CDB_OB_VECTOR_INDEX_TASK_HISTORY
- For the relationship between vector index dump, major compaction, and task types, see Vector index principles.
- For O&M and manual trigger information, see Monitor and maintain vector indexes.
