AI Wisdom
accepted2026-01-15

ADR-002: Vector Database Selection

In this article

Context

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

Options Evaluated

Pinecone

Pros
  • +Purpose-built, excellent performance at scale
  • +Managed โ€” zero operational overhead
  • +Serverless pricing available
Cons
  • โˆ’Additional vendor dependency and cost
  • โˆ’Data leaves our Supabase ecosystem
  • โˆ’Overkill for our current scale (<100K vectors)

pgvector (Supabase)

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

Decision

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

Consequences

  • โ€ข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

Related Articles

designing rag systems that actually scale

Discussion

Sign in to share your feedback and join the discussion.