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

OptionTypeStrengthsConsider when
pgvectorPostgreSQL extensionSQL, joins, transactions, one systemAlready on Postgres, up to millions of vectors
Elasticsearch / OpenSearchSearch engine with vectorsMature BM25 + vectors, aggregationsSearch-heavy apps, existing cluster
QdrantOpen-source vector DBFast filtering, payloads, Rust coreDedicated vector workloads, self-host or cloud
WeaviateOpen-source vector DBHybrid search, modules, multi-tenancyHybrid search and multi-tenant SaaS
MilvusOpen-source vector DBVery large scale, GPU indexesHundreds of millions+ vectors
PineconeManaged serviceNo ops, serverless scalingWant zero infrastructure work
ChromaEmbedded / lightweightSimple local developmentPrototypes, small apps

Feature sets evolve quickly; check current docs before deciding.

How to choose

  1. Estimate vector count and growth (thousands, millions, billions?)
  2. List filters you need at query time (tenant, ACLs, dates)
  3. Do you need hybrid keyword + vector search?
  4. Self-host or managed? What does your team already operate?
  5. Prototype with your data and measure recall and latency
Questions that narrow the choice.

Scale changes the answer

< 1M vectorspgvector / existing DB1M - 50Mpgvector or dedicated50M+dedicated / managed
Rough guide to when a dedicated vector database starts to pay off (conceptual).

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/qdrant

Keep 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.

More AI articles