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
nprobetuning. - PQ (Product Quantization) — Compress vectors.
Tradeoffs
| Index | Query | Memory |
|---|---|---|
| HNSW | ~1ms | high |
| IVF+PQ | ~5ms | low |
Links
- PostgreSQL Extensibility —
pgvectoras extension - rate-limiter — rate limiting embedding API calls
Seed from reading: 2026-08-23