Skip to main content
Version: V1.4.1

Vector index memory management

This topic describes how to estimate and manage the memory usage of all types of vector indexes in seekdb.

Configure vector index memory​

Use vector_memory_limit to configure the memory limit for the vector module. The default value, 0M, sets the limit to 50% of effective memory. Effective memory is physical memory, capped by any finite cgroup memory limit. The following example sets a 4 GB vector memory limit.

ALTER SYSTEM SET vector_memory_limit = '4G';

For information about the instance memory budget and related configuration items, see Configure memory for seekdb.

Query index memory estimation and actual usage​

You can use the DBMS_VECTOR system package to estimate the index memory usage:

The vector index memory estimation returns two pieces of information: the minimum memory configuration required to create the vector index, and the actual memory usage after the HNSW_SQ and IVF indexes are created.

tip

For memory-sparse indexes, the IDX_TYPE parameter must be specified as SINDI (case-insensitive). Otherwise, the memory estimation cannot be performed.

Query oceanbase.V$OB_VECTOR_MEMORY for actual usage and the effective vector memory limit. The columns are in bytes.

ColumnDescription
VECTOR_MEM_HOLDMemory held by the vector allocator plus memory used by vector index metadata.
VECTOR_MEM_USEDMemory used by the vector allocator plus memory used by vector index metadata.
VECTOR_MEM_LIMITThe effective memory limit of the vector module.
SELECT VECTOR_MEM_HOLD, VECTOR_MEM_USED, VECTOR_MEM_LIMIT FROM oceanbase.V$OB_VECTOR_MEMORY;

References​