Vector Databases Compared: pgvector, Qdrant, Weaviate, Milvus, Pinecone and More
How to choose a vector database: managed vs self-hosted, filtering, hybrid search, scale, cost and operational fit, with a comparison of popular options.
Published December 1, 2026
Every RAG tutorial seems to use a different vector database. The truth is that most options are good, and the right choice depends less on raw benchmark speed than on your scale, filtering needs, existing infrastructure and how much you want to operate yourself. This guide compares the main categories and options.
The concept
Options fall into three groups. Extensions to databases you already run: pgvector for PostgreSQL, vector search in Elasticsearch/OpenSearch, Redis, MongoDB Atlas and others. Purpose-built open-source vector databases you can self-host or buy managed: Qdrant, Weaviate, Milvus, Chroma. Fully managed services: Pinecone, plus managed versions of the open-source engines.
The features that usually decide the choice are metadata filtering (fast, accurate filtering by tenant, date, permissions while searching), hybrid search (keyword plus vector), multi-tenancy, horizontal scaling to hundreds of millions of vectors, and operational burden. For many teams with under a few million vectors, the database they already run is the simplest good answer.
Popular options
| Option | Type | Strengths | Consider when |
|---|---|---|---|
| pgvector | PostgreSQL extension | SQL, joins, transactions, one system | Already on Postgres, up to millions of vectors |
| Elasticsearch / OpenSearch | Search engine with vectors | Mature BM25 + vectors, aggregations | Search-heavy apps, existing cluster |
| Qdrant | Open-source vector DB | Fast filtering, payloads, Rust core | Dedicated vector workloads, self-host or cloud |
| Weaviate | Open-source vector DB | Hybrid search, modules, multi-tenancy | Hybrid search and multi-tenant SaaS |
| Milvus | Open-source vector DB | Very large scale, GPU indexes | Hundreds of millions+ vectors |
| Pinecone | Managed service | No ops, serverless scaling | Want zero infrastructure work |
| Chroma | Embedded / lightweight | Simple local development | Prototypes, small apps |
Feature sets evolve quickly; check current docs before deciding.
How to choose
- Estimate vector count and growth (thousands, millions, billions?)
- List filters you need at query time (tenant, ACLs, dates)
- Do you need hybrid keyword + vector search?
- Self-host or managed? What does your team already operate?
- Prototype with your data and measure recall and latency
Scale changes the answer
Practical examples
Qdrant: create a collection and search with a filter
Payload filters run during the vector search.
from qdrant_client import QdrantClient, models
client = QdrantClient(url="http://localhost:6333")
client.create_collection("docs", vectors_config=models.VectorParams(size=768, distance=models.Distance.COSINE))
hits = client.query_points("docs", query=query_vec, limit=5,
query_filter=models.Filter(must=[models.FieldCondition(key="tenant", match=models.MatchValue(value=42))]))Run Qdrant locally
One container for development.
docker run -p 6333:6333 -v $PWD/qdrant:/qdrant/storage qdrant/qdrantKeep embeddings portable
Store source text and model version so you can migrate or re-embed.
{"id": "doc-123#4", "text": "...", "embedding_model": "model-x-v2", "dims": 768, "tenant": 42, "updated_at": "2026-11-20"}Common mistakes
- Choosing based on a vendor benchmark instead of testing your own data and filters.
- Adding a new database to operate when your existing one would do.
- Ignoring permission filtering, leaking documents across tenants.
- Not storing the original text and embedding model version alongside vectors.
Key takeaways
- Most vector databases are good; fit matters more than benchmarks.
- Start with what you run (pgvector, OpenSearch) at small to medium scale.
- Filtering, hybrid search and multi-tenancy usually decide the choice.
- Prototype with real data and keep embeddings portable.
FAQ
Is a vector database required for RAG?
No. Any store that can do nearest-neighbour search works; for small corpora even an in-memory array is fine.
Can I switch vector databases later?
Yes, if you keep source text and metadata. Re-ingesting vectors is usually straightforward.
What about cost?
Managed services charge by storage, reads and writes or pods. Self-hosting trades bills for operational effort; compare at your expected scale.