CP-002: Vector Database Comparison Guide¶
Overview¶
This guide compares popular vector databases to help you choose the right one for Minder Academy and your use cases.
Quick Comparison Matrix¶
| Database | Self-Hosted | Cloud | Open Source | Best For | Setup Difficulty |
|---|---|---|---|---|---|
| Qdrant | ✅ Yes | ✅ Yes | ✅ Apache 2.0 | HomeLab, production | ⭐ Easy |
| Weaviate | ✅ Yes | ✅ Yes | ✅ MIT | GraphQL users | ⭐⭐ Medium |
| Pinecone | ❌ No | ✅ Yes | ❌ No | Quick cloud start | ⭐ Very Easy |
| Chroma | ✅ Yes | ❌ No | ✅ Apache 2.0 | Development, testing | ⭐ Very Easy |
| Milvus | ✅ Yes | ✅ Yes | ✅ Apache 2.0 | Large-scale | ⭐⭐⭐ Complex |
| pgvector | ✅ Yes | ❌ No | ✅ MIT | Postgres users | ⭐ Easy |
Detailed Comparison¶
1. Qdrant (Recommended for Minder Academy)¶
Overview¶
Qdrant is a high-performance vector database written in Rust. It's the recommended choice for Homelab deployment.
Key Features¶
- Performance: Written in Rust for speed and efficiency
- Memory: Optimized for resource-constrained environments
- APIs: REST and gRPC support
- Filtering: Powerful payload filtering
- Deployment: Docker, Kubernetes, or standalone binary
- Hybrid Search: Native support for vector + keyword search
Pros¶
- ✅ Lightweight (runs well on consumer hardware)
- ✅ Easy Docker deployment
- ✅ Excellent documentation
- ✅ Built-in dashboard UI
- ✅ HNSW indexing for fast search
- ✅ Support for quantization (reduces memory)
- ✅ Active community and development
Cons¶
- ❌ Newer project (less mature than Milvus)
- ❌ Cloud offering is relatively new
Quick Start¶
# Docker deployment (recommended for HomeLab)
docker run -p 6333:6333 -p 6334:6334 \
-v $(pwd)/qdrant_storage:/qdrant/storage:z \
qdrant/qdrant
# Access dashboard: http://localhost:6333/dashboard
# API endpoint: http://localhost:6333
from qdrant_client import QdrantClient
from qdrant_client.models import Distance, VectorParams, PointStruct
# Connect
client = QdrantClient(url="http://localhost:6333")
# Create collection
client.create_collection(
collection_name="demo",
vectors_config=VectorParams(size=384, distance=Distance.COSINE)
)
# Insert vectors
client.upsert(
collection_name="demo",
points=[
PointStruct(id=1, vector=[0.1, 0.2, ...], payload={"text": "hello"}),
PointStruct(id=2, vector=[0.3, 0.4, ...], payload={"text": "world"}),
]
)
# Search
results = client.query_points(
collection_name="demo",
query=[0.1, 0.2, ...],
limit=5
).points
Resource Requirements¶
| Vectors | RAM | Disk | CPU |
|---|---|---|---|
| 100K | 512MB | 1GB | 1 core |
| 1M | 4GB | 10GB | 2 cores |
| 10M | 32GB | 100GB | 4 cores |
Homelab: Handles 1M+ vectors on consumer hardware
2. Weaviate¶
Overview¶
Weaviate is an open-source vector search engine with built-in vectorization of text, images, and more.
Key Features¶
- Vectorization: Built-in models for text, images, audio
- GraphQL: Native GraphQL API
- Modules: Easy integration with OpenAI, Cohere, Hugging Face
- Schema: Strong schema typing
- Hybrid: BM25 + vector search
Pros¶
- ✅ Built-in vectorization (no separate embedding step)
- ✅ GraphQL API (flexible queries)
- ✅ Module ecosystem
- ✅ Real-time updates
- ✅ Multi-modal support
Cons¶
- ❌ Heavier resource usage
- ❌ GraphQL learning curve if not familiar
- ❌ More complex setup than Qdrant
Quick Start¶
docker run -p 8080:8080 \
-v $(pwd)/weaviate_data:/var/lib/weaviate \
semitechnologies/weaviate:latest
import weaviate
import weaviate.classes.config as wc
# Connect
client = weaviate.connect_to_local()
# Create collection (v4 renamed classes -> collections)
documents = client.collections.create(
name="Document",
vectorizer_config=wc.Configure.Vectorizer.text2vec_openai(), # built-in
properties=[
wc.Property(name="text", data_type=wc.DataType.TEXT),
wc.Property(name="category", data_type=wc.DataType.TEXT),
],
)
# Add data (auto-vectorized)
documents.data.insert({
"text": "Hello world",
"category": "greeting",
})
# Search
response = documents.query.near_text(query="greeting", limit=5)
for obj in response.objects:
print(obj.properties["text"], obj.properties["category"])
Resource Requirements¶
| Vectors | RAM | Disk | CPU |
|---|---|---|---|
| 100K | 1GB | 2GB | 1 core |
| 1M | 8GB | 20GB | 2 cores |
| 10M | 64GB | 200GB | 8 cores |
3. Pinecone¶
Overview¶
Pinecone is a fully managed vector database service. No setup required, but no self-hosted option.
Key Features¶
- Zero Setup: Create index in seconds
- Scalability: Auto-scales
- Performance: Highly optimized
- API: Simple REST API
- Security: SOC 2 compliant
Pros¶
- ✅ Zero setup time
- ✅ Auto-scaling
- ✅ High reliability (99.99% uptime SLA)
- ✅ Simple API
- ✅ Free tier available
Cons¶
- ❌ No self-hosted option
- ❌ Vendor lock-in
- ❌ Can get expensive at scale
- ❌ Limited control over configuration
Quick Start¶
from pinecone import Pinecone, ServerlessSpec
pc = Pinecone(api_key="your-api-key")
pc.create_index("demo", dimension=384, metric="cosine",
spec=ServerlessSpec(cloud="aws", region="us-east-1"))
index = pc.Index("demo")
# Insert
index.upsert([
("1", [0.1, 0.2, ...], {"text": "hello"}),
("2", [0.3, 0.4, ...], {"text": "world"}),
])
# Search
results = index.query(
vector=[0.1, 0.2, ...],
top_k=5,
include_metadata=True
)
Pricing¶
| Plan | Price | Vectors | Storage |
|---|---|---|---|
| Starter | Free | 100K | 1GB |
| Standard | $70/mo | 1M | 5GB |
| Production | $500+/mo | 10M+ | 100GB+ |
4. Chroma¶
Overview¶
Chroma is a lightweight, open-source embedding database focused on developer experience.
Key Features¶
- Simplicity: Minimal setup
- Python-native: Designed for Python developers
- In-Memory: Fast for development
- Persistence: Optional disk storage
Pros¶
- ✅ Easiest to set up
- ✅ Great for development/testing
- ✅ Python-native
- ✅ Integrates with LangChain
Cons¶
- ❌ Not production-ready for large scale
- ❌ Limited query capabilities
- ❌ Basic filtering
Quick Start¶
import chromadb
# Setup (in-memory)
client = chromadb.Client()
# Create collection
collection = client.create_collection("demo")
# Add
collection.add(
documents=["hello world", "foo bar"],
ids=["1", "2"]
)
# Search
results = collection.query(
query_texts=["greeting"],
n_results=2
)
Best For¶
- Development and testing
- Prototyping
- Small-scale applications (<100K vectors)
- Learning vector databases
5. Milvus¶
Overview¶
Milvus is a distributed vector database built for scale. Used by large enterprises.
Key Features¶
- Distributed: Built for scaling across nodes
- Index Types: Multiple indexing algorithms
- Cloud-Native: Kubernetes-ready
- Multiple SDKs: Python, Go, Java, C++, etc.
Pros¶
- ✅ Most scalable option
- ✅ Production-proven at large scale
- ✅ Multiple index types (IVF, HNSW, ANNOY)
- ✅ Active community
Cons¶
- ❌ Complex setup
- ❌ Heavy resource requirements
- ❌ Overkill for small projects
- ❌ Steep learning curve
Quick Start¶
# Docker Compose (minimum 3 services)
docker compose up -d # Spins up etcd, MinIO, Milvus
from pymilvus import connections, Collection, FieldSchema, CollectionSchema, DataType
# Connect
connections.connect(host="localhost", port="19530")
# Define schema
fields = [
FieldSchema("id", DataType.INT64, is_primary=True),
FieldSchema("embedding", DataType.FLOAT_VECTOR, dim=384)
]
schema = CollectionSchema(fields)
collection = Collection("demo", schema)
# Insert
collection.insert([[1, 2], [[0.1, ...], [0.3, ...]]])
# Search
results = collection.search(
data=[[0.1, ...]],
anns_field="embedding",
param={"metric_type": "COSINE", "params": {"nprobe": 10}},
limit=5
)
Resource Requirements¶
| Vectors | RAM | Disk | CPU |
|---|---|---|---|
| 100K | 2GB | 5GB | 2 cores |
| 1M | 16GB | 50GB | 4 cores |
| 10M | 128GB | 500GB | 16 cores |
| 100M | 1TB+ | 5TB+ | 32+ cores |
6. pgvector¶
Overview¶
pgvector adds vector similarity search to PostgreSQL. Best if you already use Postgres.
Key Features¶
- Postgres Integration: Works with existing Postgres
- SQL: Familiar SQL queries
- ACID: Transaction support
- Indexes: HNSW and IVFFlat indexes
Pros¶
- ✅ No new infrastructure
- ✅ ACID compliance
- ✅ SQL joins with vector search
- ✅ Familiar Postgres ecosystem
Cons¶
- ❌ Slower than dedicated vector DBs
- ❌ Postgres extension (not as optimized)
- ❌ Limited to Postgres users
Quick Start¶
-- Install extension
CREATE EXTENSION vector;
-- Create table
CREATE TABLE documents (
id SERIAL PRIMARY KEY,
content TEXT,
embedding vector(384)
);
-- Insert
INSERT INTO documents (content, embedding)
VALUES ('hello', '[0.1, 0.2, ...]');
-- Search
SELECT content, embedding <=> '[0.1, 0.2, ...]' AS distance
FROM documents
ORDER BY distance
LIMIT 5;
Decision Guide¶
Use Qdrant if:¶
- ✅ Building HomeLab setup (Minder Academy)
- ✅ Want self-hosted with easy setup
- ✅ Need 1M-10M vectors
- ✅ Want good performance with limited resources
- ✅ Need filtering capabilities
Use Weaviate if:¶
- ✅ Want built-in vectorization
- ✅ Prefer GraphQL API
- ✅ Need multi-modal support
- ✅ Want module ecosystem
Use Pinecone if:¶
- ✅ Want zero setup
- ✅ Budget allows cloud costs
- ✅ Need high reliability SLA
- ✅ Don't need self-hosted
Use Chroma if:¶
- ✅ Prototyping/development
- ✅ Learning vector databases
- ✅ Small scale (<100K vectors)
- ✅ Want simplest setup
Use Milvus if:¶
- ✅ Need 100M+ vectors
- ✅ Have distributed infrastructure
- ✅ Need maximum scale
- ✅ Have operations team
Use pgvector if:¶
- ✅ Already use Postgres
- ✅ Need ACID transactions
- ✅ Want SQL joins with vector search
- ✅ Small-medium scale (<1M vectors)
Performance Comparison¶
Query Speed (1M vectors, 384 dims)¶
| Database | QPS (Queries/Second) | Memory |
|---|---|---|
| Qdrant | ~10,000 | 4GB |
| Weaviate | ~8,000 | 8GB |
| Pinecone | ~12,000 | N/A (managed) |
| Chroma | ~5,000 | 2GB |
| Milvus | ~15,000 | 16GB |
| pgvector | ~3,000 | 4GB |
Indexing Speed (100K vectors)¶
| Database | Time |
|---|---|
| Qdrant | ~30 seconds |
| Weaviate | ~45 seconds |
| Pinecone | ~60 seconds |
| Chroma | ~20 seconds |
| Milvus | ~40 seconds |
| pgvector | ~90 seconds |
Cost Comparison (Monthly)¶
| Solution | 1M Vectors | 10M Vectors |
|---|---|---|
| Qdrant (self-hosted) | $0 | $0 |
| Weaviate (self-hosted) | $0 | $0 |
| Pinecone | $70 | $700+ |
| Chroma (self-hosted) | $0 | $0 |
| Milvus (self-hosted) | $0 | $0 |
| pgvector (self-hosted) | $0 | $0 |
Self-hosted costs assume you have the hardware. Cloud costs only apply to Pinecone.
Minder Academy Recommendation¶
Primary Choice: Qdrant¶
Reasons:
- HomeLab Optimized: Runs efficiently on consumer hardware with limited RAM
- Easy Setup: Single Docker container
- Built-in Dashboard: Visualize collections and vectors
- Excellent Documentation: Clear guides and examples
- Active Development: Regular updates and improvements
- Flexible Deployment: Docker, Kubernetes, or binary
- Quantization Support: Reduce memory usage by 50%+
Alternative: Chroma (for Development)¶
Use for:
- Quick prototyping
- Testing RAG systems
- Learning and experimentation
- Small proof-of-concepts
Why switch to Qdrant for production:
- Better performance
- More features
- Production-ready
- Better scalability
Migration Guide¶
From Chroma to Qdrant¶
# Export from Chroma
chroma_client = chromadb.PersistentClient(path="./chroma")
collection = chroma_client.get_collection("docs")
data = collection.get()
# Import to Qdrant
qdrant = QdrantClient("./qdrant")
qdrant.create_collection(
"docs",
vectors_config=VectorParams(size=384, distance=Distance.COSINE)
)
qdrant.upsert(
"docs",
points=[
PointStruct(
id=id,
vector=embedding,
payload={"text": text, "metadata": metadata}
)
for id, embedding, text, metadata in zip(
data["ids"],
data["embeddings"],
data["documents"],
data["metadatas"]
)
]
)
Comparison ID: CP-002
Related: UC-001: Vector Database Applications, 6401: Qdrant Setup, 6101: HNSW Indexing