What is the cost of HNSW index build in pgvector?
RAG & Vector DB Interview: pgvector HNSW, IVFFlat, Index Tuning, Postgres RAG
Audio flashcard · 0:31Nortren·
What is the cost of HNSW index build in pgvector?
0:31
HNSW index build in pgvector is parallel and can take minutes to hours depending on dataset size, dimensions, and the m and ef_construction parameters. Building an index on 10 million 1536-dimensional vectors with default parameters might take 30 to 120 minutes on a modern server. pgvector 0.6 added parallel index builds that use multiple cores, significantly reducing build time. Builds are a one-time cost per index, but future schema changes or parameter tuning require rebuilds, so plan index changes during low-traffic windows.
github.com