Best Vector Databases 2026
Every production RAG (Retrieval-Augmented Generation) system lives or dies by its vector database. The choice you make here shapes three things you will feel every day: cost (managed services can run thousands of dollars per month at scale, self-hosted options cost engineer-hours instead), latency (retrieval is on the critical path of every LLM call, so a slow index directly adds milliseconds to user-facing responses), and scale (the index that feels instant at 100K vectors may fall over or blow your budget at 100M).
The market has consolidated into a few clear camps in 2026: fully managed services like Pinecone that trade money for zero operations, open-source engines like Weaviate, Qdrant, and Milvus that you can self-host or run as cloud services, Postgres extensions like pgvector that add vector search to the database you already run, and dev-first stores like Chroma that optimize for getting a prototype running in five minutes.
This guide compares all of them on the criteria that actually matter in production: indexing performance (HNSW and friends), metadata filtering, hybrid (vector + keyword) search, horizontal scaling, operational burden, and total cost of ownership. The recommendations are based on real RAG workloads — document Q&A, semantic search, agent memory, and recommendation retrieval — not marketing benchmarks.
info
| Database | Type | Hosting | Hybrid Search | Pricing Model | Best For |
|---|---|---|---|---|---|
| Pinecone | Purpose-built, closed source | Fully managed (serverless / pods) | ✅ Sparse-dense | Usage-based, free tier → enterprise | Zero-ops production RAG |
| Weaviate | Purpose-built, open source (BSD-3) | Self-host, Weaviate Cloud, serverless | ✅ BM25 + vector (native) | Free OSS / cloud from $25/mo | Hybrid search + knowledge graphs |
| Qdrant | Purpose-built, open source (Apache 2.0, Rust) | Self-host, Qdrant Cloud, hybrid cloud | ✅ Sparse + dense vectors | Free OSS / cloud free tier → usage | Self-hosted performance + filtering |
| pgvector | PostgreSQL extension | Anywhere Postgres runs (self, RDS, Supabase, Neon) | Partial (combine with tsvector / pg_search) | Your existing Postgres bill | Teams already on Postgres, joins with relational data |
| Chroma | Dev-first embedding store | Embedded / local server / Chroma Cloud | Basic metadata filtering | Free OSS / cloud usage-based | Prototyping, local dev, notebooks |
| Milvus | Distributed, open source (Apache 2.0) | Self-host (K8s), Zilliz Cloud | ✅ Sparse + dense, analyzer | Free OSS / Zilliz Cloud usage-based | Enterprise scale, 100M+ vectors |
note
Pinecone is the incumbent fully managed vector database and the default answer to "I just want retrieval to work." Its serverless architecture (introduced in 2024 and matured since) separates storage and compute: vectors live in object storage, and query capacity scales independently. You create an index, upsert vectors, and never think about shards, replicas, or index tuning again. P99 latencies on well-sized indexes are consistently in the tens of milliseconds, and the API is deliberately minimal — there is almost nothing to misconfigure.
Strengths
Zero operational burden — no clusters, no upgrades, no 3 a.m. pages. Fast and consistent query latency out of the box. Mature SDKs (Python, TypeScript, Java, Go, Rust), namespaces for cheap multi-tenancy, integrated sparse-dense hybrid search (Pinecone Inference + pinecone-sparse-english), and a genuinely useful free tier for prototyping (one serverless index, enough capacity for a real POC). The serverless model means you pay near-zero when idle.
Weaknesses
Cost at scale is the big one: storage and read/write units add up fast past tens of millions of vectors, and many teams report bills that are 3–10× the equivalent self-hosted Qdrant or pgvector setup. It is closed source with a proprietary API, so vendor lock-in is real — migrating out means re-indexing everything. Filtering capabilities are more limited than Qdrant or Postgres, and you have no control over the underlying index parameters.
| 1 | import { Pinecone } from "@pinecone-database/pinecone"; |
| 2 | |
| 3 | const pc = new Pinecone({ apiKey: process.env.PINECONE_API_KEY! }); |
| 4 | |
| 5 | // Serverless index — no pods to size |
| 6 | const index = pc.index("docs-rag"); |
| 7 | |
| 8 | // Upsert with metadata for filtered retrieval |
| 9 | await index.namespace("support-docs").upsert([ |
| 10 | { |
| 11 | id: "chunk-001", |
| 12 | values: embedding, // number[] from your embedding model |
| 13 | metadata: { source: "refund-policy.md", category: "billing", updated: "2026-11" }, |
| 14 | }, |
| 15 | ]); |
| 16 | |
| 17 | // Query: vector similarity + metadata filter |
| 18 | const results = await index.namespace("support-docs").query({ |
| 19 | vector: queryEmbedding, |
| 20 | topK: 8, |
| 21 | filter: { category: { "$eq": "billing" } }, |
| 22 | includeMetadata: true, |
| 23 | }); |
pro tip
Weaviate is an open-source (BSD-3) vector database written in Go, available self-hosted via Docker/Kubernetes or as Weaviate Cloud (serverless and dedicated tiers). Its defining feature is that hybrid search is a first-class citizen: BM25 keyword search and vector search run natively in the same query engine, fused with tunable alpha weighting, so you don't have to bolt Elasticsearch onto the side. It also has a schema-and-class data model with cross-references between collections, which lets you model lightweight knowledge graphs — entities linked to chunks, documents linked to authors — and traverse them at query time via GraphQL or the v4 gRPC/REST clients.
Strengths
Best-in-class native hybrid search (BM25 + vector with result fusion). Modular architecture: built-in vectorizer modules (OpenAI, Cohere, Hugging Face, local models via text2vec-transformers), reranker modules, and generative modules that run the LLM call inside the query. Named vectors let one object carry multiple embeddings (e.g., title vs. body). Multi-tenancy is native and cheap. Cross-references enable graph-like traversal. Strong Kubernetes operator and replication for HA self-hosting.
Weaknesses
The schema-based model is more upfront design work than schemaless stores — you define classes and properties before inserting. Self-hosting at scale (with replication and multi-tenancy) is genuinely complex; budget real Kubernetes expertise. Memory usage on large HNSW indexes is significant (though PQ/SQ quantization helps). The GraphQL API confuses some teams, and the module ecosystem means behavior varies depending on which modules you enable.
info
Qdrant is an open-source (Apache 2.0) vector database written in Rust, and it shows: it is consistently among the fastest engines in independent ANN benchmarks, with low memory overhead and excellent CPU utilization. You can run it as a single binary or Docker container for development, scale to a sharded, replicated cluster for production, or use Qdrant Cloud (including a genuinely free 1GB cluster tier and a hybrid-cloud option that runs in your own VPC). Its API is a clean REST/gRPC interface with first-class clients in Python, TypeScript, Rust, Go, and Java.
The standout feature is payload filtering: Qdrant builds filterable indexes on metadata fields and — critically — applies filters duringHNSW graph traversal rather than post-filtering the results. Post-filtering is the silent recall killer in naive setups: if you ask for top-10 and 9 of the nearest neighbors fail your filter, you return 1 result. Qdrant's filtered traversal maintains high recall even with selective filters, which matters enormously for multi-tenant RAG, time-range filtering, and ACL-scoped search.
Strengths
Top-tier query performance and low resource usage (Rust). Best-in-class filtering with indexed payload fields and in-traversal filtering. Scalar/product quantization to cut memory 4–32× with small recall trade-offs. Sparse vectors (SPLADE-style) for hybrid search. Named vectors per point. Snapshots for backup/restore and painless migration between environments. Single-binary deployment makes self-hosting genuinely easy compared to Milvus. Permissive Apache 2.0 license.
Weaknesses
No native BM25 full-text search — hybrid search requires combining sparse + dense vectors yourself (or pairing with a keyword engine). Fewer built-in integrations (no native vectorizer modules like Weaviate — you bring your own embeddings). Cluster management, while simpler than Milvus, is still on you when self-hosting: sharding, replication, rolling upgrades, monitoring. The managed cloud is younger than Pinecone's offering.
| 1 | import { QdrantClient } from "@qdrant/js-client-rest"; |
| 2 | |
| 3 | const client = new QdrantClient({ url: process.env.QDRANT_URL, apiKey: process.env.QDRANT_API_KEY }); |
| 4 | |
| 5 | // Create a collection with on-disk payload index + HNSW tuning |
| 6 | await client.createCollection("docs", { |
| 7 | vectors: { size: 1536, distance: "Cosine", on_disk: true }, |
| 8 | hnsw_config: { m: 16, ef_construct: 100 }, |
| 9 | quantization_config: { scalar: { type: "int8", quantile: 0.99, always_ram: true } }, |
| 10 | }); |
| 11 | |
| 12 | await client.createPayloadIndex("docs", { |
| 13 | field_name: "tenant_id", |
| 14 | field_schema: "keyword", |
| 15 | }); |
| 16 | |
| 17 | // Query with in-traversal filtering — recall stays high even with selective filters |
| 18 | const hits = await client.query("docs", { |
| 19 | query: queryEmbedding, // number[] |
| 20 | limit: 8, |
| 21 | filter: { |
| 22 | must: [ |
| 23 | { key: "tenant_id", match: { value: "acme-corp" } }, |
| 24 | { key: "updated_at", range: { gte: "2026-01-01" } }, |
| 25 | ], |
| 26 | }, |
| 27 | with_payload: true, |
| 28 | }); |
pro tip
pgvector is a PostgreSQL extension that adds a vector column type and approximate-nearest-neighbor indexes (IVFFlat originally, and HNSW since 0.5.0, with iterative index scans added later to fix filtered-search recall). Its superpower is not raw ANN performance — dedicated engines beat it there — but that it is just Postgres. Your embeddings live in the same database as your users, documents, and permissions. Retrieval becomes a SQL query: vector similarity joined with relational filters, full-text search, and business logic in one round trip, with transactions, backups, and tooling you already have.
This eliminates an entire class of distributed-systems pain: no keeping a separate vector store in sync with your source of truth, no dual-write consistency bugs, no orphaned embeddings after deletions. Operationally it is nearly free if you already run Postgres well — and every managed Postgres (RDS, Cloud SQL, Azure, Supabase, Neon, Crunchy) supports it.
Strengths
Zero new infrastructure — one less system to operate, monitor, back up, and secure. Real joins: combine vector similarity with arbitrary SQL (permissions, date ranges, aggregations) in a single query. ACID transactions keep embeddings and source data consistent. Mature ecosystem: every Postgres tool, ORM, and managed service works. Combine with tsvector or the pg_search extension (BM25) for credible hybrid search. Lowest total cost for small-to-medium workloads.
Weaknesses
Scale limits are real: HNSW indexes live in the buffer cache, so performance depends on RAM, and build times get painful past tens of millions of vectors. Throughput (QPS) and recall under heavy concurrent load trail purpose-built engines. No native sparse vectors or built-in reranking. High-dimensional vectors (>2,000 dims) need workarounds (halfvec supports up to 4,000). You inherit Postgres scaling problems — read replicas help queries but writes and index builds are single-primary.
| 1 | -- Enable the extension and store embeddings next to your documents |
| 2 | CREATE EXTENSION IF NOT EXISTS vector; |
| 3 | |
| 4 | CREATE TABLE document_chunks ( |
| 5 | id BIGSERIAL PRIMARY KEY, |
| 6 | document_id BIGINT REFERENCES documents(id) ON DELETE CASCADE, |
| 7 | content TEXT NOT NULL, |
| 8 | embedding vector(1536) NOT NULL, -- text-embedding-3-small dimensions |
| 9 | tenant_id UUID NOT NULL, |
| 10 | created_at TIMESTAMPTZ DEFAULT now() |
| 11 | ); |
| 12 | |
| 13 | -- HNSW index (cosine distance) — tune m and ef_construction for recall |
| 14 | CREATE INDEX ON document_chunks USING hnsw (embedding vector_cosine_ops) |
| 15 | WITH (m = 16, ef_construction = 64); |
| 16 | |
| 17 | -- Production RAG query: similarity + ACL filter + recency, one round trip |
| 18 | SELECT c.id, c.content, c.embedding <=> ${queryEmbedding}::vector AS distance |
| 19 | FROM document_chunks c |
| 20 | JOIN documents d ON d.id = c.document_id |
| 21 | WHERE c.tenant_id = ${tenantId} |
| 22 | AND d.status = 'published' |
| 23 | ORDER BY c.embedding <=> ${queryEmbedding}::vector |
| 24 | LIMIT 8; |
| 25 | |
| 26 | -- Hybrid: combine with Postgres full-text search |
| 27 | SELECT c.id, c.content, |
| 28 | (c.embedding <=> ${queryEmbedding}::vector) AS vector_distance, |
| 29 | ts_rank_cd(to_tsvector('english', c.content), plainto_tsquery(${queryText})) AS text_rank |
| 30 | FROM document_chunks c |
| 31 | WHERE c.tenant_id = ${tenantId} |
| 32 | ORDER BY (c.embedding <=> ${queryEmbedding}::vector) - 0.05 * ts_rank_cd(to_tsvector('english', c.content), plainto_tsquery(${queryText})) |
| 33 | LIMIT 8; |
best practice
Chroma is the dev-first embedding store: an embedded library (or single-node server) with a three-line API — create collection, add documents, query. It handles embedding generation for you if you want, stores metadata, and runs in-process in Python or JavaScript notebooks. It is the fastest path from zero to a working RAG prototype, and it is what a large share of LangChain/LlamaIndex tutorials use. Its limits are equally clear: the core is single-node, filtering is basic, and production features (auth, replication, sharding) have historically been thin — Chroma Cloud now covers the managed middle ground, but for heavy production loads most teams graduate to Qdrant, Weaviate, or pgvector.
Milvus is the opposite end: a distributed, cloud-native vector database built for enterprise scale. Its architecture separates storage, query nodes, index nodes, and data nodes (coordinated via etcd and message queues), letting you scale each independently across a Kubernetes cluster. It supports a dozen index types (HNSW, IVF_FLAT, DiskANN, GPU-accelerated indexes like CAGRA), sparse vectors, a built-in full-text search analyzer, partition-level isolation for massive multi-tenancy, and billion-scale deployments proven at companies like eBay and Shopee. Zilliz Cloud is the managed offering from the creators.
Chroma — When to Use
Local development, notebooks, hackathons, demos, and small internal tools (under ~1M vectors, single writer). The DX is unmatched — if your prototype needs a vector store today, use Chroma and design your retrieval layer behind an interface so you can swap it later.
Milvus — When to Use
100M+ vectors, high sustained QPS, GPU indexing, or compliance-driven on-prem deployments with a platform team to run Kubernetes. The operational complexity is the price: a production Milvus cluster has many moving parts, and you should not self-host it without dedicated infra ownership. Use Zilliz Cloud if you want Milvus scale without the cluster-admin job.
note
Four questions settle most vector database decisions: are you prototyping or productionizing, do you want to self-host or pay for managed, what scale are you realistically heading to, and what is your true budget (dollars and engineer-hours)?
Prototyping, learning, or validating a RAG idea
→ Chroma (embedded, zero setup) or pgvector if your app already has Postgres. Optimize for iteration speed; put retrieval behind an interface so the backend can change.
Production RAG, small-to-mid scale (under ~10M vectors), team already runs Postgres
→ pgvector — one less system to operate, SQL joins for filters and permissions, and the lowest total cost. Move on only when benchmarks on YOUR data show you hitting its limits.
Production RAG, want zero operations, budget is flexible
→ Pinecone serverless — the least to operate, great latency, generous free tier to start. Model the cost at 10× your current scale before committing.
Production RAG, self-hosted or cost-sensitive, heavy metadata filtering / multi-tenancy
→ Qdrant — best self-host DX, excellent filtered recall, quantization keeps RAM low. Run it in Docker/K8s or start on the free cloud tier.
Search quality is the product (e-commerce, support search, legal/medical retrieval)
→ Weaviate — native BM25 + vector hybrid with fusion, reranker modules, and multi-vector support. Hybrid search typically lifts retrieval quality more than any model tweak.
Billion-scale, GPU indexing, dedicated platform team
→ Milvus (self-hosted K8s) or Zilliz Cloud. Only take on this complexity when the scale genuinely demands it.
Data must stay in your VPC / on-prem for compliance
→ Qdrant or Milvus self-hosted, Weaviate self-hosted, or pgvector on your own Postgres. Avoid managed-only services without a hybrid-cloud option.
best practice
Vector databases are sticky. Migrating means re-exporting or re-computing every embedding, rebuilding indexes, and revalidating retrieval quality — for a large corpus that can be days of compute and weeks of validation. Design for eventual migration even if you never do it:
note
Tune the index, measure recall
HNSW parameters (m, ef_construction / ef_search) trade build time, memory, and recall. Defaults are conservative; measure recall@10 against brute-force ground truth on a sample of YOUR data, then raise ef_search until recall flattens. A 2% recall gain often beats a model upgrade.
Index your filter fields
Unindexed metadata filters are the #1 cause of slow queries and poor recall. In Qdrant create payload indexes; in pgvector ensure filter columns have B-tree indexes and enable iterative scans; in Weaviate mark filterable properties. Filtered traversal beats post-filtering every time.
Use hybrid search for real user queries
Pure vector search fails on SKUs, error codes, names, and rare terms. Combine BM25/keyword with dense vectors (Weaviate hybrid, Qdrant sparse+dense, pgvector + tsvector/pg_search, Pinecone sparse-dense) and fuse results (RRF or weighted). Expect a meaningful lift in retrieval quality on real query logs.
Cache embeddings aggressively
Embedding API calls cost money and add latency on your critical path. Cache query embeddings (Redis keyed by normalized query hash), cache document embeddings by content hash so re-chunking unchanged docs is free, and batch embedding requests during indexing.
Namespace / partition multi-tenant data
Isolate tenants with namespaces (Pinecone), multi-tenancy (Weaviate), partitions (Milvus), or row-level filters with indexed tenant_id (Qdrant/pgvector). Per-tenant indexes don't scale to thousands of tenants; a single shared index with enforced filters usually does.
Monitor retrieval quality, not just latency
Track recall proxies (click-through on retrieved chunks, LLM judge scores on groundedness, % of queries with zero high-score results). Vector indexes degrade silently as data drifts — alerting on p99 latency alone won't catch a retrieval quality regression.
pro tip
Community
Get help on Slack, Discord or VIP
Stuck on a guide? Join the community and ask.