Skip to content
mentoor

Topic 4 of 5 · 6 min read

Picking a vector store for the job

Goal: Recommend a vector store for a described workload and team, listing the deciding factors and the point at which the choice should change.

Choose the vector store from your data size, filter needs and who will run it, and start with the one you already operate.

Check yourself · 1 of 3

Which store is an in-process library rather than a server?

Choose one answer

Why it matters

The store is hard to swap later: the data, the index settings, the filter syntax and the client code all change. Teams that pick by benchmark headlines often end up running a second database for a corpus that fits in a Postgres table.

The options in one line each

  • pgvector in PostgreSQL. One system, transactions, SQL joins and filters. Fits most corpora up to a few million chunks, and you tune memory yourself.
  • Qdrant and Weaviate. Dedicated, open source, self-hostable or managed. Strong filtering during search, built-in hybrid search and sharding.
  • Pinecone. Fully managed and serverless. No servers to run, with a per-use bill and your data in their cloud.
  • Elasticsearch and OpenSearch. Search engines with dense vector fields. Best when you already run them and want keyword and vector search plus filters in one query.
  • FAISS (and similar libraries). A library inside your process. Very fast, no server, no filters or persistence unless you build them. Good for batch jobs, research and small offline corpora.

How to decide

  1. Size. Count vectors times dimension times 4 bytes. One million 1536-dimension vectors is about 6 GB of raw floats, before the index. If that fits in the memory you have, any option works.
  2. Filters and permissions. Heavy per-user or per-tenant filtering favours stores that filter during search.
  3. Hybrid search. If keyword matching matters (error codes, names), prefer a store with built-in lexical search, or plan the join.
  4. Operations. A team without a database operator should lean to managed, or to the database it already has.
  5. Data rules. Residency and privacy requirements can rule out a hosted service.

State the trigger for change: for example "move off pgvector when the index no longer fits in RAM, or p95 exceeds 200 ms after tuning".

Before and after

Before: "We need a vector database, let's use the most popular." After: "400,000 chunks, 4 tenants, Postgres already running, one engineer: pgvector with HNSW. Revisit at 20 million chunks or when filtered recall cannot be fixed."

What goes wrong

  • Resume-driven choice. A new cluster for a corpus that fits on a laptop.
  • Ignoring the filter path. The store benchmarks well unfiltered and badly with your filters.
  • No exit plan. Storing only vectors and not the source text, so re-embedding is impossible.

Examples

Small team, Postgres in place

80,000 support articles, one engineer, filters by product. Recommend pgvector: no new system, joins with the product table, filters are plain SQL. Change when the corpus passes tens of millions of chunks or latency cannot be tuned back.

Large multi-tenant search

200 million vectors, per-customer filters, a platform team that runs clusters. A dedicated store with filtered search and sharding, such as Qdrant, is the better fit than one Postgres server.

Key points

  • Start with the database you already run; most corpora up to a few million chunks fit pgvector.
  • Estimate size as vectors x dimensions x 4 bytes, then compare it to the memory you can give the index.
  • Heavy metadata filtering, sharding or hybrid search can justify a dedicated store such as Qdrant or Weaviate.
  • Managed services such as Pinecone trade running costs and control for less operational work.
  • A recommendation names its deciding factors and the measurable point at which it should change.

Common mistakes

  • Choosing from an unfiltered benchmark when production queries always filter.
  • Adding a new database for a corpus that fits in one table.
  • Storing only embeddings, with no source text to re-embed from.
  • Recommending a store without saying when to reconsider.

Check yourself · 2 of 3

A team has Postgres, one engineer, and 300,000 chunks filtered by customer. What is the best starting choice?

Choose one answer

Check yourself · 3 of 3

Roughly how much raw memory do 2 million 768-dimension float32 vectors need, before any index overhead?

Choose one answer

Practice items, not counted towards your mastery.

Start here

More for this topic