Overview
Note
Viewing vector index segment merge tasks is supported starting from V4.6.2.1.
Displays the execution status and progress of long-running operations in the cluster, including DDL operations and incremental segment merge tasks for vector indexes.
Columns
Field |
Type |
Nullable |
Description |
|---|---|---|---|
| SID | bigint(20) | NO | Session ID |
| TRACE_ID | varchar(64) | NO | The trace ID of this statement |
| OPNAME | varchar(64) | NO | Operation Name |
| TARGET | varchar(64) | NO | Operation Object |
| SVR_IP | varchar(46) | NO | IP Address of the Machine Where the Operation Is Performed |
| SVR_PORT | bigint(20) | NO | Port number of the server where the operation is performed |
| START_TIME | date | NO | Start Time |
| ELAPSED_SECONDS | bigint(21) | NO | Elapsed Time |
| TIME_REMAINING | bigint(20) | NO | Estimated Time Remaining |
| LAST_UPDATE_TIME | date | NO | Statistics Update Time |
| MESSAGE | varchar(512) | NO | Remarks |
Sample query
View the progress of a running vector index segment merge task:
SELECT SID, OPNAME, TARGET, ELAPSED_SECONDS, TIME_REMAINING, MESSAGE
FROM GV$SESSION_LONGOPS
WHERE OPNAME = 'VEC MERGE TASK';
You can also combine this view with the task view to obtain the complete execution status of a MERGE task:
SELECT
t.TABLET_ID,
t.TASK_TYPE,
t.STATUS,
t.TRACE_ID,
l.ELAPSED_SECONDS,
l.TIME_REMAINING,
l.MESSAGE
FROM OCEANBASE.DBA_OB_VECTOR_INDEX_TASKS t
LEFT JOIN GV$SESSION_LONGOPS l ON l.TARGET = CONCAT('task_id=', t.TASK_ID)
WHERE t.TASK_TYPE = 'INCREMENTAL_INDEX_MERGE'
AND t.STATUS = 'RUNNING';
When the plan monitor data is not yet available (for example, when an SQL statement has just started executing), the MESSAGE field may display a wait message and the progress percentage may be 0. The corresponding longops records are automatically cleaned up after the task is completed.
References
- V$SESSION_LONGOPS
- For more information about segment merging and monitoring of vector indexes, see Monitor and maintain indexes