Scalar Quantized IVF Indexes

Create scalar quantized IVF indexes to reduce vector storage and query latency, then rescore candidates against original vectors to refine top-K results.

Scalar quantization compresses each vector dimension independently. Oracle AI Database uses uniform scalar quantization, which divides each dimension’s input range into equal intervals and maps each value to a quantization level. Quantization reduces storage and supports faster integer arithmetic, with some loss of precision.

Note: The storage requirement of the quantized index is calculated according to the quantization scale.

For IVF indexes, the quantized vectors are stored in centroid partitions (CP table). The index build uses original vectors for k-means clustering and stores per-partition minimum and maximum values as quantization metadata.

Scalar quantization can be specified during IVF index creation using the CREATE VECTOR INDEX DDL. For syntax and additional information, see Inverted File Flat CREATE INDEX and Oracle AI Database SQL Language Reference.

During query processing, the system quantizes the query vector using the index’s quantization metadata. The system retrieves K multiplied by rescore_factor candidates using quantized distances. It then computes full-precision distances against the original vectors and returns the top K results.

For global IVF indexes, rescoring supports no-filter, pre-filter, post-filter, and terminable-iteration query plans. If post-filtering leaves fewer than K rows, the IVF scan resumes until it finds K rows or exhausts the candidates.

Index Maintenance and Limitations

The index maintains the centroid partition table and quantization metadata during inserts, updates, and deletes. Online rebuilds are supported for global quantized IVF indexes. During a rebuild, the system creates quantization metadata for the new index image and removes the old image’s entries after the image swap.

Scalar quantization is not currently supported for IVF indexes on local indexes, function-based indexes, or external tables. It is also not supported for an empty table when the FLEX vector type or dimension cannot be resolved.