pgvector vs Pinecone vs Qdrant: Choosing a Vector Store for Your Existing Backend (2026)
6 min read · Last verified July 11, 2026
Here's the answer most vector-database content buries: if you already run Postgres and you have fewer than a few million vectors, use pgvector and move on. The interesting question isn't which engine wins a benchmark; it's when a second datastore earns a place in your architecture. That's a question backend engineers already know how to ask. You didn't adopt Elasticsearch because it was "better at text" in the abstract; you adopted it when Postgres LIKE queries actually fell over.
This guide maps the three archetypes, pgvector (extension in the database you already run), Qdrant (self-hosted specialist), and Pinecone (managed serverless), onto that familiar decision, with the thresholds, the failure modes, and the one cost everyone underestimates.
The three archetypes, in backend terms
pgvector is "keep it in Postgres." An extension that adds a vector column type, cosine/L2/dot-product operators, and HNSW + IVFFlat indexes to the database you already operate, back up, monitor, and authorize. A similarity query is just SQL:
SELECT id, title, body
FROM documents
WHERE tenant_id = $1 -- your existing filters, for free
ORDER BY embedding <=> $2 -- cosine distance to query vector
LIMIT 6;Qdrant is "run your own Elasticsearch." A dedicated vector engine (Rust, open source) you deploy and operate yourself, or rent as managed cloud. Purpose-built HNSW with strong filtered search, quantization for memory control, sparse vectors for hybrid search, and horizontal sharding. It exists for the scale and latency regimes where a general-purpose database strains.
Pinecone is "DynamoDB for vectors." Fully managed, serverless, pay-for-what-you-use. No index tuning, no capacity planning, no version upgrades. And no self-hosted escape hatch. You're buying the absence of operations, priced accordingly, with the vendor coupling that implies.
What actually decides it in production
Operational ownership
pgvector adds zero new moving parts: your existing backups, replication, monitoring, and access control cover it. Qdrant adds a service you page on: memory sizing (HNSW lives in RAM), snapshots, upgrades, shard rebalancing. Pinecone removes the pager entirely and replaces it with a bill and a dependency. This is the same triangle as RDS vs self-hosted-on-EC2 vs DynamoDB, and your team's answer is probably consistent with what you chose there.
The sync-pipeline tax (the cost nobody prices in)
A dedicated vector store is a second source of truth. The document lives in Postgres; its embedding lives elsewhere. Now you own a synchronization pipeline: dual writes or CDC, orphan cleanup when deletes don't propagate, backfills when it drifts, and a staleness window where search returns chunks whose source row changed underneath it. Every team that adopts a separate vector DB builds this pipeline; almost nobody budgets for it.
With pgvector, the embedding is a column next to the row. Update document and embedding in one transaction; delete cascades; a JOIN answers "which chunks belong to live documents" trivially. Transactional consistency between your data and its vectors is pgvector's real feature. The query speed comparisons are noise next to this.
Scale and latency thresholds
Rules of thumb as of mid-2026, assuming HNSW and ~1,000-dimension embeddings:
- Up to ~1M vectors: pgvector is comfortably in single-digit-to-low-tens-of-milliseconds territory on ordinary hardware. No contest: stay in Postgres.
- 1M–10M: pgvector still works; you're now tuning (
m,ef_construction,ef_search), watching index build times (hours, not minutes, at the top of the range) and RAM pressure against your OLTP workload. A read replica for search traffic buys headroom. Specialists start to look attractive if latency targets are tight. - Beyond ~10M, high write churn, or hard sub-10ms p99: dedicated-engine territory. Qdrant with quantization, or Pinecone if you'd rather not operate it. Independent comparisons live at ANN-Benchmarks; read them the way you read database benchmarks, as tier indicators, not verdicts.
Filtered search
Production vector search is never "nearest neighbors across everything"; it's nearest neighbors for this tenant, in this language, from live documents. Filters interact badly with graph indexes: post-filtering an HNSW result set can silently collapse recall (fetch 10 nearest, filter to this tenant, get 1 result back). Postgres lets you combine B-tree filters with vector ordering, with the planner deciding (usually well, occasionally needing a partial index per hot filter). Qdrant's filtered HNSW is a genuine strength: filters are evaluated inside graph traversal. Pinecone handles metadata filtering serverlessly with namespace isolation. If your filters are high-cardinality and mandatory (multi-tenant SaaS), test filtered recall specifically; it's where naive setups fail first.
The decision table
| pgvector | Qdrant | Pinecone | |
|---|---|---|---|
| Backend analogy | Index in the DB you run | Self-hosted Elasticsearch | DynamoDB |
| New infrastructure | None | A service you operate | A vendor you depend on |
| Data ↔ vector consistency | Transactional, free | Sync pipeline you build | Sync pipeline you build |
| Scale sweet spot | 0–5M vectors | Millions–billions | Millions–billions |
| Filtered search | Good, planner-dependent | Excellent, native | Good, namespaces |
| Hybrid (dense+sparse) | tsvector + vector in SQL | Native sparse vectors | Dense + sparse indexes |
| Cost shape | Existing Postgres bill | Instances + your time | Per-use, premium |
| Pick it when | You run Postgres, scale is normal | Real scale, want control | Real scale, want no ops |
Migration is cheap: start small
Here's what defuses the fear of choosing wrong: the application-facing interface is tiny. Nearly every RAG system calls two operations: upsert(id, vector, payload) and search(vector, filters, k). Put those behind one module (the same single-chokepoint discipline as LLM calls), and moving from pgvector to Qdrant later is a re-index and a config change, not a rewrite. The expensive migration is re-embedding your corpus when you change embedding models, and that cost is identical no matter which store you picked.
Starting with pgvector is therefore the low-regret default: if it never breaks, you saved a datastore; if it breaks at 8M vectors, you migrate with your eval suite watching recall, having deferred the operational cost for months.
Failure modes to engineer around
Recall collapse under filters. Covered above; test with your real filter cardinality before shipping, not after.
Index build and rebuild time. HNSW builds on millions of rows take real time (pgvector builds can run hours at the high end; maintenance_work_mem matters). Plan re-embeds and rebuilds like schema migrations: off-peak, monitored, reversible.
Embedding version drift. Changing embedding models means re-embedding everything: vectors from different models don't share a space. Version your embeddings column/collection (embedding_v2), migrate behind a flag, and A/B recall before cutting over.
Memory pressure (self-hosted). HNSW wants RAM. On pgvector it competes with your buffer cache; on Qdrant, quantization (int8/binary) cuts memory 4–30x at a small recall cost. Measure, don't guess.
If you remember one thing: the vector store is the least interesting decision in your RAG system: retrieval quality lives in chunking, hybrid search, and reranking, which the RAG module of the track covers. Pick the store that adds the least operational surface today, behind an interface that keeps tomorrow cheap.
Sources & further reading: pgvector · Qdrant documentation · Pinecone documentation · ANN-Benchmarks
FAQ
Is pgvector fast enough for production RAG?
Yes, for the majority of workloads. With an HNSW index, pgvector serves single-digit-millisecond nearest-neighbor queries at hundreds of thousands of vectors and stays comfortably sub-100ms into the low millions, on hardware you were already running. Most internal RAG features never exceed that scale.
At how many vectors does pgvector stop being the right choice?
There is no cliff, but pressure builds past a few million vectors per index: HNSW build times stretch, memory competes with your OLTP workload, and heavily-filtered queries lose recall. Treat 5–10M vectors, high write churn, or hard sub-10ms latency targets as the signals to evaluate a dedicated engine.
When does Pinecone actually earn its price?
When you want zero vector-infrastructure operations: no index tuning, no capacity planning, no upgrade windows. If your team is small, your scale is real (tens of millions of vectors), or vector search is core to the product and you'd rather buy the pager than carry it, managed serverless is a rational trade.
Do I need hybrid search (vectors plus keywords)?
Sooner than you think. Pure semantic search misses exact identifiers (SKUs, error codes, function names) that keyword search nails. Postgres gives you both in one query (pgvector + tsvector); Qdrant supports sparse vectors natively; on Pinecone you combine dense and sparse indexes.