Create IVF Index Online
When the base table must remain available for ongoing updates and cannot be
locked during index creation, use the ONLINE clause with CREATE VECTOR
INDEX to build the IVF index online. This allows applications with heavy DML to
continue updating the table while the index is being created.
Syntax
CREATE VECTOR INDEX index_name ON table_name (vector_column)
ORGANIZATION NEIGHBOR PARTITIONS
DISTANCE distance_metric
WITH TARGET ACCURACY target_accuracy
PARAMETERS (type IVF, neighbor partitions num_partitions)
ONLINE;Usage Notes
- All vectors indexed need to have the same dimension and storage type throughout the index creation. Any changes or inconsistencies during index creation result in errors (for example, ORA-51902, ORA-51934).
- If the base table experiences a very high rate of DML during index build, then index creation time may increase.
- Online index creation with included columns (columns in addition to the vector column) is not currently supported.
- Online creation of local IVF vector indexes is not currently supported.
Example
CREATE VECTOR INDEX galaxies_ivf_idx ON galaxies (embedding)
ORGANIZATION NEIGHBOR PARTITIONS
DISTANCE COSINE
WITH TARGET ACCURACY 90
PARAMETERS (type IVF, neighbor partitions 10)
ONLINE;Parent topic: Inverted File Flat CREATE INDEX