All posts
AI engineering · 8 min read

pgvector vs Pinecone vs Qdrant: Which to Pick

The short answer

Use pgvector if you already run Postgres, which covers most projects under roughly a million chunks. It adds vector search to a database you already pay for and operate, with no new service. Move to Qdrant or Pinecone when you pass a few million vectors, need fast filtering on metadata at scale, or want someone else to run it. The choice rarely changes answer quality; chunking and retrieval strategy affect that far more.

Most vector database comparisons are benchmark tables. They are not useful, because the decision almost never turns on query latency. It turns on whether you want to run another service.

Here is the short version, then the reasoning.

The answer

SituationUse
You already run Postgres, under ~1M chunkspgvector
Millions of vectors, heavy metadata filteringQdrant
You want it fully managed and will pay for thatPinecone
You are not surepgvector, and revisit when something hurts

Most projects are the first row and stop there.

Why pgvector is the default

It is a Postgres extension. If you run Supabase, Neon, RDS or a Postgres container, you already have it or can enable it in one line.

That means no second database, no second bill, no second thing to back up, no second thing to monitor, and no network hop between your relational data and your vectors. You can join embeddings against your actual tables in a single query, which sounds minor until you want "find similar documents, but only ones this user can see".

create extension if not exists vector;

create table chunks (
  id bigserial primary key,
  document_id bigint references documents on delete cascade,
  user_id uuid not null,
  content text not null,
  embedding vector(1536)
);

create index on chunks using hnsw (embedding vector_cosine_ops);
create index on chunks (user_id);

A filtered similarity search is then just SQL:

select content, 1 - (embedding <=> $1) as score
from chunks
where user_id = $2
order by embedding <=> $1
limit 8;

Try expressing that cleanly when your vectors live in one system and your permissions in another.

What pgvector actually costs you

Honest limits, because it is not free of tradeoffs:

Index builds are slow and memory-hungry. Building an HNSW index over a few million rows takes real time and RAM. On a small instance it can be painful. You can build concurrently, but plan for it.

Memory is the ceiling, not query speed. Performance falls off when the index stops fitting comfortably in memory. That arrives sooner than people expect on a small Postgres instance.

Filtered search is adequate, not exceptional. Postgres filters and then searches, or searches and then filters, depending on the planner. With a highly selective filter over many tenants, purpose-built engines do this better.

For a chatbot over a few thousand documents, none of these matter. At ten million vectors across a thousand tenants, all of them do.

When Qdrant earns its place

Qdrant is built for this one job and it shows, particularly on filtered search. Its payload filtering is integrated into the search itself rather than applied around it, which is the difference that matters at scale and with many tenants.

Choose it when you have millions of vectors, when nearly every query carries a filter, or when you want to self-host something purpose-built. It runs as a container and the operational burden is modest.

When Pinecone earns its place

Pinecone is the managed option. You do not run it, tune it or think about index parameters. For a team with no infrastructure capacity, or one that simply does not want vector search to be their problem, that is worth paying for.

The trade is cost at scale and less control. You are also adding a vendor to your architecture diagram, which matters more than it sounds when an enterprise buyer sends a security questionnaire.

What it actually costs

Small projectGrowing
pgvector$0 extra$0 extra, plus a bigger instance eventually
Qdrant Cloud$0 to $30/moScales with stored vectors
Pinecone$0 to $50/moScales faster than most expect

For a typical internal chatbot the real difference is $0 against $20 to $70 a month. That is not a decision worth a week of evaluation, which is roughly what the comparison blog posts will cost you in reading time.

The thing people get wrong

Teams switch vector databases to fix bad answers. It almost never works, because the database is not what is wrong.

All three use similar approximate nearest neighbour algorithms over the same embeddings and return near-identical neighbours. If your retrieval is returning irrelevant passages, the cause is upstream:

  • Chunking. Splitting at a fixed character count cuts tables in half and separates headings from their text.
  • No metadata. Without document name, page and section attached, you cannot cite sources or filter sensibly.
  • Vector search alone. Documents full of product codes and part numbers need keyword search too. Embeddings blur exact terms, and exact terms are often the whole question.
  • No re-ranking. Retrieving twenty candidates and re-ranking to the best five is usually the single biggest quality improvement available, and it is independent of which database you chose.

Fix those before changing infrastructure. We have never seen a migration fix an accuracy problem that chunking did not.

Migrating later is not scary

The usual reason people over-choose at the start is fear of migration. It is a day or two: re-embed or export your vectors, write them to the new store, swap the retrieval function. Your chunks and metadata live in Postgres either way, which is where the actual value is.

Pick the simple option now. Revisit when something measurably hurts.

We build retrieval systems as AI integration work, with the data side under cloud and DevOps.

For what a full system costs to build and run, what a RAG chatbot over your own documents really costs has the numbers and the accuracy work in detail. If you are putting one into a multi-customer product, how not to leak data between customers covers keeping one tenant's embeddings out of another's results.

Common questions

Which vector database should I use?
pgvector, if you already run Postgres and have fewer than roughly a million chunks. It is an extension on a database you already operate, so it adds no service, no bill and no new failure mode. Choose Qdrant or Pinecone above that scale, or when you need heavy metadata filtering alongside vector search.
Is pgvector fast enough for production?
Yes, for most applications. With an HNSW index it handles hundreds of thousands to a few million vectors with query times in the tens of milliseconds. The practical limits arrive sooner through memory and index build time than through query speed.
How much do vector databases cost?
pgvector is free beyond the Postgres you already pay for. Qdrant Cloud and Pinecone both start around $0 to $25 a month on small managed tiers and rise with stored vectors and queries. For a typical internal chatbot the difference is $0 against $20 to $70 a month, which is rarely the deciding factor.
When should I migrate off pgvector?
When index build times start interfering with ingestion, when your working set no longer fits comfortably in memory, or when you need filtered search across many tenants at speed. Migrating is mostly re-embedding and re-indexing, so it is a day or two of work, not a rewrite. Do not pre-emptively choose a managed service to avoid a migration that may never be needed.
Does the vector database affect answer quality?
Barely. All three use similar approximate nearest neighbour algorithms and return near-identical results on the same embeddings. Answer quality is decided by how you chunk documents, what metadata you attach, whether you combine keyword with vector search, and whether you re-rank. Teams switching databases to fix accuracy are usually fixing the wrong thing.
Work we do on this

Want this looked at properly?

Tell us what you're working with. We'll give you a straight answer in a 30-minute call, free.

One post a week

What this actually costs, and how it breaks.

Prices, timelines and the failures we keep running into, written down properly. No pitch, and you can leave in one click.

Read next