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, segment merge tasks, and major compaction tasks for the current tenant. You can distinguish the task types based on the TASK_TYPE column.
Columns
| Column | 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 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 task type. Valid values:
|
|
| TASK_SCN | bigint(20) | NO | The task version number. | |
| RET_CODE | bigint(20) | NO | The status of the task. Valid values:
|
|
| TRACE_ID | varchar(512) | NO | The task execution trace ID. | |
| TASK_INFO | long text | NO | The detailed progress of the task. This column displays the information in JSON format. The information includes the details of each segment for a segment merge task, such as the SCN, key range, index, and memory usage of the segment. This way, you can comprehensively understand the task execution process. |
Sample query
In the sys tenant, query the historical information of vector index performance optimization tasks for 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 column.
| Column | JSON field 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 the array is the same as that in the merge_segments_cnt column. |
| 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 to process vectors in the segment. Valid values:
|
| mem_used | string | The memory used by the segment. |
| min_vid | string | The minimum vector ID in the segment. |
| max_vid | string | The maximum vector ID in the segment. |
