Pick a vector DB in 5 min: benchmarks, Docker one-liners, cost cheat-sheet → no more scroll-of-death on HackerNews.
Introduction
Generative AI and retrieval-augmented generation (RAG) have pushed vector databases into the spotlight. Whether you’re building semantic search, recommendation systems, or intelligent assistants, you’ll eventually need to store and query millions of embeddings efficiently.
Traditional databases aren’t designed for this workload: vector search requires approximate nearest neighbor (ANN) algorithms, dedicated indexing, and integrations with ML frameworks. The open source ecosystem has exploded, but choosing the right solution depends on your scale, use case, and team maturity.
This guide keeps it simple: here’s a quick way to navigate the main options in 2025.
TL;DR
- Prototyping → Chroma, pgvector
- Mid-scale production → Weaviate, Qdrant
- Enterprise scale → Milvus, MyScaleDB
- Always benchmark on your embeddings before committing
- Don’t over-engineer too early — migration paths exist
Quick Comparison
Database | Pros | Ideal Use Case |
---|---|---|
pgvector | PostgreSQL extension, easy setup | Small projects, existing SQL teams |
Chroma | Python-first, very lightweight | Notebooks, quick prototyping |
Weaviate | Hybrid search, GraphQL, plugins | Text + vector hybrid apps |
Qdrant | Rust core, high perf, low memory | Real-time, low-latency apps |
Milvus | Enterprise-grade, billions scale | Critical, massive workloads |
MyScaleDB | SQL + vector, fast ingestion | Analytics + similarity combined |
Practical Notes
pgvector
- Install:
CREATE EXTENSION vector;
- Query:
SELECT * FROM items ORDER BY embedding <-> '[0.1,0.2,...]' LIMIT 5;
- Ecosystem: Works with Django, SQLAlchemy, any PostgreSQL tool.
Chroma
- Install:
pip install chromadb
- Query (Python):
results = client.query(query_embeddings=[vector], n_results=5)
- Ecosystem: Tight LangChain integration, notebook-friendly.
Weaviate
- Install:
docker run -d -p 8080:8080 semitechnologies/weaviate
- Query (GraphQL):
{
Get {
Product(nearVector: {vector: [0.1,0.2,...]}) {
name
}
}
}
- Ecosystem: Plugins for OpenAI, Cohere, HuggingFace.
Qdrant
- Install:
docker run -d -p 6333:6333 qdrant/qdrant
- Query (REST):
{"vector":[0.1,0.2,...], "limit":5}
- Ecosystem: SDKs in Python, Go, JS; LangChain + Haystack.
Milvus
- Install (Helm):
helm repo add milvus https://milvus-io.github.io/milvus-helm/
helm install my-milvus milvus/milvus
- Query (Python):
results = collection.search(vectors, "embedding", limit=5)
- Ecosystem: Towhee, LangChain, strong K8s support.
MyScaleDB
- Install:
docker run -d -p 8123:8123 myscale/myscale:latest
- Query (SQL):
SELECT id FROM products ORDER BY distance(embedding, [0.1,0.2,...]) LIMIT 5;
- Ecosystem: HuggingFace datasets, LangChain, LlamaIndex.
Operational Considerations
- Monitoring: Milvus/Weaviate expose Prometheus; Qdrant offers Grafana dashboards; MyScaleDB inherits ClickHouse tooling.
- Backups: Easy with pgvector/Chroma (dumps), snapshots in Qdrant, more complex in Milvus clusters.
-
Cost:
- Small VM: pgvector, Chroma
- Few nodes: Weaviate, Qdrant
- Distributed clusters (5–10x cost): Milvus, MyScaleDB
Conclusion
There’s no universal “best” vector database. The right choice depends on volume, latency constraints, and organizational maturity.
- Start small with pgvector or Chroma.
- Scale with Weaviate or Qdrant as your workload grows.
- Move to Milvus or MyScaleDB for enterprise-grade deployments.
Always run a POC with your own data and embeddings before committing. The ecosystem is evolving fast — staying flexible matters as much as choosing the right tool today.
Top comments (0)