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
You can set the ob_vector_memory_limit_percentage parameter to configure the memory usage of vector indexes in seekdb:
The default value is 0, which indicates the adaptive mode. In this mode, the system automatically adjusts the memory usage ratio of vector index data in the instance. You do not need to manually adjust the memory usage:
- If the actual memory of the instance is 8 GB or less, the value is automatically adjusted to
40. - If the actual memory of the instance is more than 8 GB, the value is automatically adjusted to
50.
Query index memory estimation and actual usage
You can use the DBMS_VECTOR system package to estimate the index memory usage:
- Before you create a table, you can call the INDEX_VECTOR_MEMORY_ADVISOR procedure to estimate the index memory usage.
- After you create a table and insert data, you can call the INDEX_VECTOR_MEMORY_ESTIMATE procedure to analyze 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.
For memory-sparse indexes, the IDX_TYPE parameter must be specified as SINDI (case-insensitive). Otherwise, the memory estimation cannot be performed.
You can query the GV$OB_VECTOR_MEMORY or V$OB_VECTOR_MEMORY view to obtain detailed information about the actual memory usage.
Optimize memory usage during index rebuild
For partitioned tables, we also provide the vector_index_memory_saving_mode parameter to control the memory usage during index rebuild. Enabling this mode reduces the memory consumption during the rebuild process of vector indexes in partitioned tables. Typically, vector index rebuild consumes twice the memory of the index. When this mode is enabled, the system temporarily deletes the memory index of the partition after the index is built in the partition. This effectively reduces the total memory required for the rebuild operation. For more information, see vector_index_memory_saving_mode.
References
- Overview of vector indexes
- For information about the automatic rebuild of index partitions, see Monitor and maintain vector indexes