01 / VCHORDRQ · DISK-FRIENDLY IVF
Store 100M+ vectors without exhausting RAM
◇ Hierarchical K-Means + RaBitQ 4-bit / 8-bit Quantization
- Compresses 32-bit float vectors by 8× to 32× with mathematically bounded distance estimation error
- Only compact centroids stay in memory; quantized inverted lists stream from SSD with
io_uring/posix_fadviseprefetching - Supports external multi-node or GPU index precomputation for 100M+ vectors with zero production CPU contention
Scale to hundreds of millions of vectors on a 32 GB PostgreSQL node.
-- Enable VectorChord (auto-loads pgvector)
CREATE EXTENSION IF NOT EXISTS vchord CASCADE;
-- Build a hierarchical RaBitQ index
CREATE INDEX items_emb_idx ON items
USING vchordrq (embedding vector_l2_ops)
WITH (options = $$
residual_quantization = true
[build.internal]
lists = [4096]
$$);