Dissimilarity search...
summary
PGVector implements IVFFlat and HNSW inside PostgreSQL, trading a fixed 8KB page layout and TOAST constraints against in-memory ANN behavior. Builds sample ~10k vectors, use parallel assignment to cut build time, and normalize vectors to remove costly sqrt/divisions. HNSW tuning (M=16/64, construction EF up to 256) heavily affects tuples scanned and recall; deletions hide+repair via vacuuming (the hardest part). Binary quantization shows extreme tradeoffs: 33k qps 80% recall—big speed and storage gains at lower recall.
AI-written summary · about
chapters (14)
- 0:00Introduction to vector search
- 3:10Why vectors matter in AI
- 7:23Challenges with large vectors
- 12:15Database constraints for ANN
- 18:12Design principles for ANN in Postgres
- 22:05Implementing vector data type
- 26:59Distance functions and operators
- 31:09Custom indexing methods
- 33:59IVF flat indexing explained
- 41:02HNSW indexing deep dive
- 48:24Vacuuming and maintenance
- 50:27Quantization techniques
- 51:32Future of vector search in Postgres
- 52:21Q&A session
related talks
44mScaling Semantic Search in PostgreSQL
41mPostgreSQL for AI. Real Vector Search in PostgreSQL
48mFrom Text to Meaning: pgvector Transforms PostgreSQL Search
52mVector search is now boring, but PostgreSQL has ways to go
53mVectors: how to better support a nasty data type in PostgreSQL
52mpgvector Newbie to Expert
25mVector data in Postgres - how's it different from "normal" data?
48mVectors are the new JSON
