Vector Database

Stores embeddings and does nearest neighbor search at scale.

Why not Postgres?

Postgres with pgvector works up to ~1M vectors. Beyond that, specialized indexes win: HNSW, IVF-PQ.

Indexes

  • HNSW (Hierarchical Navigable Small World) — Graph. Fast, high recall, high memory. Used by Qdrant, Weaviate.
  • IVF (Inverted File) — Cluster vectors into Voronoi cells. Search only closest cells. Needs nprobe tuning.
  • PQ (Product Quantization) — Compress vectors.

Tradeoffs

IndexQueryMemory
HNSW~1mshigh
IVF+PQ~5mslow

Seed from reading: 2026-08-23