Overview
The CDB_OB_VECTOR_INDEX_TASKS view displays information about all background tasks related to vector indexes for all tenants in the cluster, including partition rebuilding, segment minor compaction and major compaction, IVF clustering center loading and cleanup, semantic index refreshing, and memory synchronization. You can distinguish task types using the TASK_TYPE column in the view.
Columns
Field |
Column type |
Nullable |
Description |
|---|---|---|---|
| TENANT_ID | bigint(20) | YES | Tenant ID |
| TABLE_ID | bigint(20) | YES | Table ID |
| TABLET_ID | bigint(20) | YES | Partition ID |
| TASK_ID | bigint(20) | YES | Task ID |
| CREATE_TIME | timestamp(6) | YES | Task creation time
NoteThis field is supported starting from V4.6.2.1. |
| MODIFY_TIME | timestamp(6) | YES | The time when the task was last updated. This field is automatically refreshed each time the row record in the table is updated.NoteThe meaning of this field has changed from the task end time to the task update time since V4.6.2.1. |
| TRIGGER_TYPE | varchar(16) | NO | Task trigger type:
NoteStarting from V4.6.2.1, this field is displayed as a string enumeration instead of a numeric value. |
| STATUS | varchar(16) | NO | Task status:
NoteStarting from V4.6.2.1, this field has been changed from a numeric value to a string enumeration, and the |
| TASK_TYPE | varchar(64) | NO | Task type:
NoteStarting from V4.6.2.1, this field has been changed from a numeric value to a string enumeration, and task types |
| TASK_SCN | bigint(20) | NO | Task Version |
| RET_CODE | bigint(20) | NO | Status at the end of the task:
|
| TRACE_ID | varchar(512) | NO | Task Execution Tracking ID |
| PROGRESS_INFO | varchar(512) | NO | Task execution progress information, displayed in JSON format. It typically includes the current operation, estimated number of rows, number of rows completed, completion percentage, and estimated remaining time. This information is updated every 10 seconds. The JSON string contains the following fields: status, estimated_row, finished_row, progress, and time_remaining(s):
|
| TASK_INFO | longtext | NO | Detailed progress information of the task. The information is displayed in JSON format and includes details of each segment in a major compaction task, such as the SCN, key range, index, and memory usage. For tasks that consume significant memory, such as partition-level index rebuilding or incremental segment major compaction, the output may also include mem_limit_info The memory throttling section records information related to memory throttling (supported starting from V4.6.2.1), facilitating a comprehensive understanding of the task execution process. |
| EXEC_ADDR | varchar(52) | YES | The node that executes the task (in the format of IP address:port), which identifies the server address where the task is actually running. The default value is empty.
NoteThis field is supported starting from V4.6.2.1. |
| PRIORITY | int | NO | Task priority. A smaller value indicates a higher priority, decreasing in order. The default value is 0.
NoteThis field is supported starting with V4.6.2.1. |
| START_TIME | timestamp(6) | YES | The time when the task starts to be executed. This parameter is empty by default. |
| END_TIME | timestamp(6) | YES | End time of task execution. This field is empty by default.
NoteThis field is supported starting from V4.6.2.1. |
| ERR_MSG | varchar(1024) | YES | Error message when the task fails. The default value is empty.
NoteThis field is supported starting from V4.6.2.1. |
Sample query
Complete example
In the sys tenant, view the performance optimization task information for vector indexes of all tenants.
SELECT * FROM oceanbase.CDB_OB_VECTOR_INDEX_TASKS ORDER BY MODIFY_TIME DESC\G;
The query result is as follows:
*************************** 1. row ***************************
TENANT_ID: 1004
TABLE_ID: 500178
TABLET_ID: 1152921504606847126
TASK_ID: 14556
CREATE_TIME: 2026-03-25 23:42:43.330766
MODIFY_TIME: 2026-03-25 23:42:43.332887
TRIGGER_TYPE: USER
STATUS: RUNNING
TASK_TYPE: INCREMENTAL_INDEX_FREEZE
TASK_SCN: -1
RET_CODE: -1
TRACE_ID: Y2C277F000001-00064DDA41D11952-0-1
PROGRESS_INFO: NULL
TASK_INFO: NULL
EXEC_ADDR: 11.xxx.xx.xx:30510
PRIORITY: 0
START_TIME: 2026-03-25 23:42:43.331200
END_TIME: NULL
ERR_MSG: NULL
1 row in set
The following table describes the fields of the TASK_INFO field.
Field |
JSON field types |
Meaning |
|---|---|---|
| merge_segments_cnt | string | Number of Segments to Be Merged |
| merge_segments | array | Segment information before major compaction. The number of segments is equal to merge_segments_cnt. |
| result_segments | array | Information on the Merged Segment |
| scn | string | Internal Timestamp |
| start_key | string | Upper Bound of Segment Storage Range |
| end_key | string | Lower bound of segment storage range |
| index_type | string | The index type for processing vectors. Valid values:
|
| mem_used | string | Memory Used by Segments |
| mem_limit_info | object | Memory Throttling Information, Including task_memory_limited, vector_mem_hold, vector_mem_limit, task_estimate_memory, tasks_total_reserved_memory and other fields. This only occurs in memory-intensive tasks such as partition-level index rebuilding or incremental segment merging. |
| min_vid | string | Minimum Vector ID of a Segment |
| max_vid | string | Maximum Vector ID of a Segment |
View memory throttling information
Note
This feature is supported starting with V4.6.2.1.
For memory-intensive tasks such as partition-level index rebuilding or incremental segment merging, the task information may include a mem_limit_info section that records memory throttling details. You can query the following SQL statement to obtain memory usage estimates and throttling information:
SELECT
TABLET_ID,
TASK_TYPE,
JSON_EXTRACT(TASK_INFO, '$.mem_limit_info.task_estimate_memory') AS estimate_mem,
JSON_EXTRACT(TASK_INFO, '$.mem_limit_info.vector_mem_hold') AS mem_hold,
JSON_EXTRACT(TASK_INFO, '$.mem_limit_info.vector_mem_limit') AS mem_limit,
JSON_EXTRACT(TASK_INFO, '$.mem_limit_info.task_memory_limited') AS was_throttled
FROM OCEANBASE.CDB_OB_VECTOR_INDEX_TASKS
WHERE TASK_TYPE = 'PARTITION_REBUILD';
The subfields of the mem_limit_info field are described in detail as follows:
Subfield |
Unit |
Note |
|---|---|---|
task_memory_limited |
Whether memory throttling has been triggered (true/false) | |
vector_mem_hold |
byte | Tenant Vector Memory Usage During Task Scheduling |
vector_mem_limit |
byte | Total Tenant Vector Memory Limit |
task_estimate_memory |
byte | Estimated Memory Requirement for the Current Task |
tasks_total_reserved_memory |
byte | Total Reserved Memory for Other Running Tasks |
References
- DBA_OB_VECTOR_INDEX_TASKS
- For the relationship between HNSW vector index minor compactions, major compactions, and task types, see Indexes
- For more information about maintenance and manual triggering, see Monitor and maintain indexes