Every RAG system needs somewhere to store and search embeddings, and the choice matters more for your operational life than your answer quality. The good news: you probably don't need the fanciest option. This is a practical comparison of the three most common choices — pgvector, Pinecone, and Qdrant — plus when each is the right call.
All three retrieve well. The real differences are operational: managed vs self-hosted, scaling ceiling, filtering/hybrid features, and cost. Pick for how you want to operate it, not for a benchmark.
The three at a glance
| pgvector | Pinecone | Qdrant | |
|---|---|---|---|
| What it is | Postgres extension | Fully-managed vector DB | Open-source vector DB (self-host or cloud) |
| Ops burden | Lowest if you already run Postgres | None (SaaS) | Medium (self-host) or none (cloud) |
| Scale ceiling | Millions of vectors (with HNSW) | Very high, managed | Very high |
| Metadata filtering | Yes (SQL) | Yes | Yes (rich, fast) |
| Hybrid search | Via extensions/SQL | Yes | Yes (built-in) |
| Cost model | Your existing DB | Usage-based SaaS | Free self-host / paid cloud |
| Best when | You already run Postgres | You want zero ops at scale | You want open-source + control |
pgvector — start here if you run Postgres
pgvector adds vector similarity search to PostgreSQL. If Postgres is already in your stack, this is the pragmatic default: one fewer system to operate, your vectors sit next to your relational data (so metadata filtering is just SQL), and with HNSW indexing it comfortably handles millions of chunks. It's what I reach for first — see the Spring AI + pgvector RAG guide for a full build.
Watch-outs: at very large scale or very high query concurrency you may outgrow it, and you own the tuning (index parameters, VACUUM, etc.).
Pinecone — zero-ops managed scale
Pinecone is a fully-managed, purpose-built vector database. You don't run anything — it scales, indexes, and handles availability for you. Great when you want to not think about vector infrastructure and are comfortable with a usage-based SaaS bill.