Hirestack
Hirestack
Chapter 9

RAG Systems · Vector databases — choosing and operating

📖 2 min read · 5 sections · May 2026

Why this matters

Storing and querying millions of embeddings cheaply, with millisecond latency, with metadata filters, with frequent updates — every vector DB makes a different set of tradeoffs. Picking poorly locks you into the wrong cost curve for years.

The landscape

DBHostedOSSStrengthsCaveats
PineconeZero ops, best-in-class index management, multi-tenant nativePricey at scale; vendor lock
WeaviateHybrid search (BM25 + dense) built inResource hungry on self-host
QdrantFast, Rust, excellent filtering, payload indexingNewer, smaller ecosystem
ChromaBest DX for prototypes; Python-nativeNot battle-tested above ~10M vectors
pgvector (Postgres)via RDS/Supabase/NeonReuses existing Postgres; ACID + joins + vectors in one querySlower than dedicated DBs above ~5M vectors; harder to scale writes
Vespa / OpenSearchMassive scale; hybrid search + ranking; ML servingOperationally heavy; overkill for <100M vectors

Indexing algorithms — what you should know

Metadata filtering is where pain lives

"Find similar docs, but only those by user_id=X, dated after Y, in language Z." Filters interact poorly with ANN indexes — they can drop recall to zero if applied naively (the candidates from the index don't match the filter, so you get nothing back).

Three patterns DBs use:

  1. Pre-filter: restrict candidates first, then ANN search the subset. Good for selective filters; bad if the filter is loose (you index a lot).
  2. Post-filter: ANN search, then filter results. Fast but loses recall when the filter is selective.
  3. Filtered HNSW / Qdrant payload indexing: filter during graph traversal. Best of both — Qdrant and Weaviate are particularly good at this.
War story: team built RAG on Pinecone with user_id filtering. Most users had ~50 docs each. ANN with post-filter regularly returned 0 results because the top-50 ANN candidates were from other users. Switched to Qdrant with payload index on user_id — same workload, recall jumped from 30% to 95%.

Operational concerns