DEV Community

Pascal CESCATO
Pascal CESCATO

Posted on

From Zero to 1 B Vectors: the 2025 No-BS Picking Guide

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;
Enter fullscreen mode Exit fullscreen mode
  • Query:
  SELECT * FROM items ORDER BY embedding <-> '[0.1,0.2,...]' LIMIT 5;
Enter fullscreen mode Exit fullscreen mode
  • Ecosystem: Works with Django, SQLAlchemy, any PostgreSQL tool.

Chroma

  • Install:
  pip install chromadb
Enter fullscreen mode Exit fullscreen mode
  • Query (Python):
  results = client.query(query_embeddings=[vector], n_results=5)
Enter fullscreen mode Exit fullscreen mode
  • Ecosystem: Tight LangChain integration, notebook-friendly.

Weaviate

  • Install:
  docker run -d -p 8080:8080 semitechnologies/weaviate
Enter fullscreen mode Exit fullscreen mode
  • Query (GraphQL):
  {
    Get {
      Product(nearVector: {vector: [0.1,0.2,...]}) {
        name
      }
    }
  }
Enter fullscreen mode Exit fullscreen mode
  • Ecosystem: Plugins for OpenAI, Cohere, HuggingFace.

Qdrant

  • Install:
  docker run -d -p 6333:6333 qdrant/qdrant
Enter fullscreen mode Exit fullscreen mode
  • Query (REST):
  {"vector":[0.1,0.2,...], "limit":5}
Enter fullscreen mode Exit fullscreen mode
  • 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
Enter fullscreen mode Exit fullscreen mode
  • Query (Python):
  results = collection.search(vectors, "embedding", limit=5)
Enter fullscreen mode Exit fullscreen mode
  • Ecosystem: Towhee, LangChain, strong K8s support.

MyScaleDB

  • Install:
  docker run -d -p 8123:8123 myscale/myscale:latest
Enter fullscreen mode Exit fullscreen mode
  • Query (SQL):
  SELECT id FROM products ORDER BY distance(embedding, [0.1,0.2,...]) LIMIT 5;
Enter fullscreen mode Exit fullscreen mode
  • 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)