Vector databases are essential for RAG and similarity search. This covers 6 leading solutions.

Quick Comparison

DB Self-Hosted Cloud Memory Scaling AI Features
Qdrant βœ… βœ… Low High Hybrid Search
Weaviate βœ… βœ… Medium High Generative
Milvus βœ… βœ… High Very High Advanced
Chroma βœ… ❌ Low Medium Simple
pgvector βœ… βœ… Low High PostgreSQL
Pinecone ❌ βœ… Managed Cloud Managed

Qdrant

Best for: Production RAG, Hybrid Search

docker run -p 6333:6333 qdrant/qdrant

Strengths: Rust performance, hybrid search (BM25+vector)
Weaknesses: Smaller ecosystem than Weaviate

Weaviate

Best for: Graph-based AI apps, generative search

Generative Search: Query β†’ Vector Search β†’ LLM Generation

Milvus

Best for: Cloud scale (millions of vectors)

Performance: Faster than Qdrant/Weaviate at scale

Chroma

Best for: Local development, quick start

import chromadb
client = chromadb.Client()
collection = client.create_collection(name="docs")
collection.add(documents=["Doc1"], ids=["id1"])
results = collection.query(query_embeddings=[[...]], n_results=5)

pgvector (PostgreSQL)

Best for: Existing PostgreSQL infrastructure

CREATE EXTENSION vector;
CREATE TABLE embeddings (
  id SERIAL PRIMARY KEY,
  text TEXT,
  embedding vector(1536)
);
CREATE INDEX ON embeddings USING ivfflat (embedding vector_cosine_ops);

Pinecone

Best for: Fully managed (no infrastructure)

Cost: ~$0.10 per 1M vectors/month

Recommendation by Use Case

  • POC locally: Chroma
  • Production self-hosted: Qdrant or Weaviate
  • Large scale: Milvus
  • Fully managed: Pinecone
  • PostgreSQL native: pgvector