pgvector vs Milvus
Both are alternatives to Pinecone. Here's how they stack up — verified facts, no spin.
Also searched as Milvus vs pgvector — same comparison, one verdict.
pgvector keeps your data local by default and Milvus keeps it in the vendor's cloud — for most teams that single fact decides it.
pgvector
Vector search inside the Postgres you already run — zero new infrastructure.
pgvector is an open-source extension (PostgreSQL license) that adds vector similarity search to PostgreSQL itself. If your app already has Postgres, this is the no-new-moving-parts answer: embeddings live next to your relational data, joins and filters are just SQL, and every major managed Postgres (RDS, Cloud SQL, Azure, Supabase, Neon) supports it. Recent releases added parallel HNSW index builds, iterative scans for filtered queries, and halfvec quantization — it now handles serious workloads, not just prototypes.
Milvus
The heavy-scale distributed choice — billions of vectors, Apache-2.0.
Milvus is a cloud-native, distributed vector database under the LF AI & Data Foundation, licensed Apache-2.0 and developed by Zilliz. It is engineered for the top end of scale — billions of vectors, horizontal scaling, tiered storage — with a managed option (Zilliz Cloud) when you want the same engine without the Kubernetes homework. If your vector workload is genuinely huge, this is the open-source engine built for it.
Side by side
10 points of comparison, every one read from a verified field. Green marks the side that wins a row outright. A dash means we do not hold that fact — never that it is zero.
| pgvector | Milvus | |
|---|---|---|
| Sovereignty ScoreOur transparent 0–100 composite for data ownership and exit cost. | 94 | 88 |
| Open source | Yes | Yes |
| Self-hostable | Yes | Yes |
| Local-first data | Yes | No |
| License | PostgreSQL | Apache-2.0 |
| Pricing | Free — an extension of PostgreSQL; runs wherever your Postgres runs | Free self-hosted (Apache-2.0); Zilliz Cloud managed tiers incl. a free tier |
| RAM to run it wellThe figure that actually matters, not the vendor's minimum. | 8 GB — the HNSW index wants to be resident | — |
| Realistic running costWhat the box costs each month if you run it yourself. | $0 additional if you already run Postgres. That is the entire argument. | — |
| Setup timeHonest first-install estimate, not the marketing quickstart. | 20 minutes — `CREATE EXTENSION vector;` | — |
| Ongoing maintenanceThe part nobody budgets for. | None beyond the Postgres you already maintain. | — |
pgvector edges it on the Sovereignty Score, but the right pick depends on the trade-offs below.
Weighing both against staying on Pinecone? Is Pinecone free? What it actually costs →
pgvector
Strengths
- +No new database to operate — it's your existing Postgres
- +Vectors join directly with relational data in SQL
- +Supported by every major managed Postgres provider
- +HNSW indexes, filtered iterative scans, quantization
Trade-offs
- −Very large collections (hundreds of millions of vectors) favor a dedicated engine
- −Tuning happens in Postgres terms — indexes, memory, vacuum
Milvus
Strengths
- +Proven at billion-vector scale, horizontally scalable
- +LF AI & Data governance — not a single-vendor project
- +Managed escape hatch (Zilliz Cloud) with the same engine
Trade-offs
- −Distributed architecture = real operational complexity self-hosted
- −Overkill for small and mid-size workloads
Which one fits you
The trade-offs above, turned into a decision. Find the line that describes your team.
Choose pgvector
if your data should stay on machines you control, and no new database to operate — it's your existing Postgres.
Choose Milvus
if proven at billion-vector scale, horizontally scalable.
Neither, yet
if both carry a real cost you should weigh first — very large collections (hundreds of millions of vectors) favor a dedicated engine, and distributed architecture = real operational complexity self-hosted. If either of those is a dealbreaker for your team, the shortlist is wrong rather than the choice.
What it takes to run these yourself
Real requirements and honest running costs, not the vendor quickstart.
pgvector vs Milvus — common questions
Is pgvector a better fit than Milvus for vector databases & ai search?
It depends on what you are optimising for, and the honest split is this: pgvector scores 94 to Milvus's 88 on data ownership and exit cost, so it is the safer choice if you care about being able to leave. Milvus earns its place on a different axis — proven at billion-vector scale, horizontally scalable. Neither is a wrong answer for every team; the table above is the actual comparison.
What happens if we want to switch later?
pgvector keeps its data local or in open formats, so leaving is an export rather than a negotiation. Milvus is still self-hostable, so the files stay on your server either way — but it is not local-first by design, so check what its export produces before you rely on it.
Can I self-host pgvector or Milvus?
Both can be self-hosted. The difference is what it costs you in time rather than whether it is possible — see the setup and maintenance rows above.
Are pgvector and Milvus both alternatives to Pinecone?
Yes — both appear in our Pinecone comparison, which is why they are worth putting side by side. People usually arrive here already having decided to move off Pinecone and now choosing between the two replacements, which is a narrower and much easier question.
Related alternative guides
Facts verified 2026-07-15. Licenses and pricing change — spotted something out of date? That's a correction we want.