AI Wisdom
accepted2026-01-15

ADR-002: Vector Database Selection

In this article

The problem

We need a vector database for our RAG pipeline. Options range from managed services (Pinecone, Weaviate Cloud) to integrated solutions (pgvector in our existing PostgreSQL).

What we weighed

Pinecone

Pros
  • +Purpose-built, excellent performance at scale
  • +Managed โ€” zero operational overhead
  • +Serverless is now the default deployment model (pod-based indexes moved to legacy status)
Cons
  • โˆ’Additional vendor dependency and cost
  • โˆ’Data leaves our Neon ecosystem
  • โˆ’Overkill for our current scale (<100K vectors)

pgvector (Neon)

Pros
  • +Already in our stack โ€” zero new infrastructure
  • +ACID transactions with metadata
  • +SQL-based querying (familiar to team)
  • +Free tier covers our needs
Cons
  • โˆ’Performance degrades at millions of vectors
  • โˆ’Fewer ANN algorithm options than specialised DBs
  • โˆ’HNSW index tuning requires PostgreSQL expertise

Qdrant

Pros
  • +Best open-source performance benchmarks
  • +Rich filtering with payload indexes
  • +Can self-host or use cloud
Cons
  • โˆ’Another service to manage
  • โˆ’Rust-based โ€” team less familiar

What we chose

We chose pgvector via Neon. Our vector count is well within pgvector's sweet spot (<1M vectors). Using our existing PostgreSQL instance eliminates operational complexity, and Neon's built-in vector functions provide a clean API. We'll migrate to a dedicated vector DB if we exceed 1M vectors.

What it committed us to

  • โ€ขVector search performance tied to PostgreSQL resources
  • โ€ขMust create HNSW indexes with appropriate parameters (m=16, ef_construction=64)
  • โ€ขCannot use advanced features like multi-vector search without custom SQL
  • โ€ขScaling ceiling around 1-5M vectors depending on dimensionality

Discussion

Sign in to share your feedback and join the discussion.