Overview
This view displays the basic information and real-time status of each data segment in a single partition of HNSW series index tables for all tenants across all OBServer nodes. For the correspondence between fields such as SEGMENT_TYPE and SEGMENT_STATE and baseline segments, incremental segments (active/frozen/persisted), as well as minor and major compaction processes, see Indexes.
Columns
Field Name |
Data type |
Whether can be NULL |
Description |
Information Type |
|---|---|---|---|---|
| SVR_IP | varchar(46) | NO | Node address of the replica | Basic Information |
| SVR_PORT | bigint(20) | NO | RPC_PORT of the replica node | Basic Information |
| TENANT_ID | bigint(20) | NO | Tenant ID
|
Basic Information |
| DATA_TABLE_ID | bigint(20) | NO | Data Table ID | Basic Information |
| DATA_TABLET_ID | bigint(20) | NO | Partition ID | Basic Information |
| VBITMAP_TABLET_ID | bigint(20) | NO | The storage auxiliary table (index_id) corresponds to the partition ID. | Basic Information |
| INC_INDEX_TABLET_ID | bigint(20) | NO | The partition ID of the delta_buffer table that stores incremental data. | Basic Information |
| SNAPSHOT_INDEX_TABLET_ID | bigint(20) | NO | Partition ID of the index_snapshot_data table that stores data snapshots. | Basic Information |
| BLOCK_COUNT | bigint(20) | NO | The number of data blocks contained in the snapshot segment in the index_snapshot_data table. | Basic Information |
| SEGMENT_TYPE | varchar(20) | NO | Segment type. Valid values:
|
Basic Information |
| INDEX_TYPE | varchar(20) | NO | Vector index types:
|
Basic Information |
| MEM_USED | bigint(20) | NO | The memory size occupied by the current segment (in bytes). | Basic Information |
| MIN_VID | bigint(20) | NO | The smallest vector ID (vid) contained in the segment. | Basic Information |
| MAX_VID | bigint(20) | NO | The maximum vector ID (vid) contained in the segment. | Basic Information |
| VECTOR_CNT | bigint(20) | NO | The number of vectors (data) in a segment. | Basic Information |
| REF_CNT | bigint(20) | NO | The reference count of a segment, which typically indicates the number of times it is referenced by indexes or queries. | Basic Information |
| SEGMENT_STATE | varchar(20) | NO | Status of the current segment:
|
Basic Information |
| PERSISTENCE_TIMESTAMP | timestamp | NO | Timestamp when segment persistence is completed (obtained by converting the segment's SCN). | Basic Information |
| SEGMENT_PARAMS | varchar(256) | NO | The vector index parameters actually used by the current segment. Each parameter is represented as KEY=VALUE The format is as follows: multiple parameters are separated by commas (,). For example: m=32, ef_construction=300. |
Basic Information |
Sample query
Users can query the real-time status of HNSW vector indexes for all tenants across all OBServer nodes.
SELECT * FROM oceanbase.GV$OB_HNSW_INDEX_SEGMENT_INFO ORDER BY PERSISTENCE_TIME DESC\G;
The query result is as follows:
*************************** 1. row ***************************
SVR_IP: 127.0.0.1
SVR_PORT: 11303
TENANT_ID: 1004
DATA_TABLE_ID: 500149
DATA_TABLET_ID: 200019
VBITMAP_TABLET_ID: 1152921504606847128
INC_INDEX_TABLET_ID: 1152921504606847126
SNAPSHOT_INDEX_TABLET_ID: 1152921504606847129
BLOCK_COUNT: 1
SEGMENT_TYPE: PERSISTED_BASE
INDEX_TYPE: HNSW
MEM_USED: 553332
MIN_VID: 11
MAX_VID: 10005
VECTOR_CNT: 2005
REF_CNT: 2
SEGMENT_STATE: PERSISTED
PERSISTENCE_TIME: 2026-03-25 23:20:31.481903
After modifying HNSW series index parameters using DBMS_VECTOR.ALTER_INDEX_PARAMS, you can check the SEGMENT_PARAMS column to understand the actual parameters used by each segment. In the following example, 500001 is the data table ID; please replace it with the actual value you need to query.
SELECT SVR_IP, SVR_PORT, DATA_TABLE_ID, DATA_TABLET_ID,
SEGMENT_TYPE, SEGMENT_STATE, SEGMENT_PARAMS
FROM oceanbase.GV$OB_HNSW_INDEX_SEGMENT_INFO
WHERE DATA_TABLE_ID = 500001
ORDER BY DATA_TABLET_ID DESC\G;
The return result is shown below:
*************************** 1. row ***************************
SVR_IP: 127.0.0.1
SVR_PORT: 28831
DATA_TABLE_ID: 500001
DATA_TABLET_ID: 206145
SEGMENT_TYPE: PERSISTED_BASE
SEGMENT_STATE: PERSISTED
SEGMENT_PARAMS: DISTANCE=L2, TYPE=HNSW, LIB=VSAG, M=16, EF_CONSTRUCTION=200, EF_SEARCH=64
1 row in set