pgvector vs
Dedicated Vector DB.
Start with pgvector. For most applications under roughly a million vectors it is not a compromise — it is the better engineering choice, because you keep one database, transactional consistency, and the ability to combine similarity search with ordinary SQL filters in a single query. Move to a dedicated system when scale, query rate, or specific index features genuinely demand it.
Side by side
| Dimension | pgvector | Dedicated Vector DB |
|---|---|---|
| Practical scale ceiling | Comfortable to ~1M vectors; workable beyond with tuning | Tens of millions upward |
| Operational burden | None new — it is your existing Postgres | Another system to run, monitor, and back up |
| Metadata filtering | Full SQL, joined and indexed | Varies; often a restricted filter language |
| Transactional consistency | Vectors and business data commit together | Separate store; eventual consistency to manage |
| Index types | HNSW and IVFFlat | Broader, including quantised and disk-based indexes |
| Query throughput | Good; competes with Postgres workload | Higher, purpose-built |
| Cost at small scale | Effectively free | A new line item |
| Cost at large scale | Rises as Postgres memory pressure grows | Better cost per vector |
The argument most comparisons miss
Benchmarks compare raw nearest-neighbour throughput, and that is rarely the constraint in a real application. The queries production systems actually run look like: find the passages most similar to this question, restricted to documents this user is permitted to see, excluding archived items, within this date range.
That is a similarity search combined with several structured filters, and it is where naive setups fall apart. In Postgres it is one query with proper indexes and correct results. With a separate vector store you must either duplicate permission and status metadata into it and keep that copy synchronised, or over-fetch candidates and filter afterwards — which silently degrades recall when the filter is selective, because the true nearest permitted neighbour may not be in the top k you retrieved.
When a dedicated system earns its place
Genuine scale is the clearest trigger. Beyond several million vectors, keeping the index resident in Postgres memory competes with your transactional workload, and purpose-built systems offer disk-based and quantised indexes designed for that regime.
High sustained query rates matter too: if vector search is your primary traffic rather than an occasional lookup, isolating it protects your operational database. Managed options also make sense when you want someone else to own index tuning and scaling — that is a legitimate reason to pay, not a technical concession.
And some workloads need index features Postgres does not offer, such as aggressive product quantisation for very large collections or specialised multi-vector retrieval.
What to get right either way
The choice of store is less consequential than three things that determine retrieval quality regardless. Chunking — what you embed matters more than where you keep it. Hybrid search — pure vector similarity fails on part numbers, proper nouns, and exact identifiers, so combine it with keyword matching. Reranking — retrieve a wider candidate set cheaply, then reorder with a cross-encoder; this is frequently the largest single quality gain available. See RAG for how these fit together.
Plan for re-embedding from the start whichever you pick. Vectors from different embedding models are incomparable, so a model upgrade means regenerating the entire index. Keep the source content and the embedding pipeline reproducible so that is a scheduled job rather than an incident.
pgvector vs Dedicated Vector DB — questions.
At what scale should we move off pgvector?
There is no universal threshold, but useful signals are index size approaching the memory you can spare on your Postgres instance, p95 search latency drifting past your budget, or vector queries beginning to interfere with transactional workload. Many teams run comfortably into the low millions of vectors. Measure your own latency and memory headroom rather than migrating on a number from a blog post.
Can I use both?
Yes, and it is a reasonable pattern at scale — keep source content, metadata, and permissions in Postgres as the system of record, and mirror vectors into a dedicated index for search. The cost is a synchronisation path you must build and monitor, including reindexing after content changes. Worth it at genuine scale, unnecessary complexity below it.
Other comparisons.
RAG vs Fine-Tuning
RAG supplies knowledge; fine-tuning changes behaviour. A practical decision guide, including why the answer is often both and rare…
ReadPyTorch vs TensorFlow
PyTorch won research and most of production. Where TensorFlow still makes sense, what actually differs now, and why the choice mat…
ReadXGBoost vs Neural Networks
On tabular business data gradient-boosted trees usually beat deep learning. Why that is, when neural networks win, and how to choo…
ReadStill not sure
which to pick?
We make this call on production systems every week. Describe your constraints and we will give you a straight recommendation.
Start the conversationor write to us at [email protected]