~/talk

Scaling Semantic Search in PostgreSQL

Talkat PGConf India 2025 · 2025-03-05..03-07· [databases, machine-learning]
links:none on file
slides:none on file

PGVector on PostgreSQL supports IVF‑flat and HNSW indexes; HNSW gives best runtime but needs huge memory — approximate formula shows 1M vectors ≈6 GB, 10M ≈65 GB, 100M ≈650 GB and build times from ~6 minutes to ~18 hours — so tuning instance size, shared_buffers and maintenance_work_mem is mandatory. Use HNSW memory formula, tune M and ef (grid‑search or heuristic paths, validate on 100k samples), apply partitioning or partial indexes for filtering, enable iterative index scan, and use half precision quantization to halve index size with negligible recall loss.

AI-written summary · about

  1. 0:00Introduction and overview
  2. 1:52Vector databases basics
  3. 6:30Recall in approximate search
  4. 10:24Challenges in scaling PG Vector
  5. 22:26Problem space and trade-offs
  6. 23:08Instance sizing and parallel builds
  7. 24:11Dimensionality reduction
  8. 25:38Quantization techniques
  9. 30:33Filtering strategies
  10. 36:17Tuning HNSW parameters
  11. 40:51Hyperparameter tuning methods
  12. 41:31Mental model for vectors
  13. 42:13Q&A and closing
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.