FDE Times dataFDE jobs open 932▼14 Change in open roles over 7 days, like-for-like: roles from companies we started tracking this week are left outNew in 7 days 62Companies hiring 202Remote-friendly 24%Median US pay $201kTop hirer Databricks 92
中文VI

The newspaper of the Forward Deployed Engineer

Tools

The best vector database is usually the one the client already runs

Every new service brings backups, monitoring and someone on call at night, so a client already running Postgres should try pgvector before anything else.

ShareLinkedInFacebookX

In brief

  • If the client already runs Postgres, try pgvector first: vectors sit next to the data and get ACID, JOINs and point-in-time recovery.
  • With an approximate index, pgvector applies filters after the index scan, so it can return fewer results than you asked for. Qdrant's payload index filters during the search itself.
  • If the client already uses Elasticsearch for keyword search, use the knn query on the existing cluster for hybrid search, but you still need an embedding pipeline and a way to combine scores.
Decision tree for choosing a vector database. An orange box on the left asks: Which system does the client run? The question splits into three branches. Branch 1: if the client already has Postgres, try pgvector first, checking that filters applied after the index scan may return too few rows, and HNSW's 2,000-dimension limit. Branch 2: if the client has nothing yet but needs heavy filtering, use Qdrant, whose payload index filters during the search itself, but decide who will run the new service. Branch 3: if the client uses Elasticsearch for keyword search, run a knn query on the existing cluster, checking the embedding pipeline, reindexing and how vector and full-text scores are blended.
The system a client already runs settles most of the vector database choice. Switch only when you can measure a specific problem the existing system cannot solve.

Engineers new to a client site tend to reach for benchmarks, study the leaderboards and propose a “purpose-built” vector database. A much simpler question should come first: what does the client already run? The answer usually settles most of the choice.

The reason is practical. Every new service brings backups, monitoring, access control and someone who has to be on call when it goes down. For an FDE, choosing a vector database is mostly a problem of fitting into the client’s existing infrastructure; raw performance is only part of it. Below are three common options and when to use each.

Client already on Postgres? Try pgvector first

The official repository describes pgvector as an open-source extension for vector similarity search in Postgres. Its biggest advantage is where it lives. Vectors are stored right next to the business data, so they inherit ACID, point-in-time recovery and JOINs, as the README lists.

Take an insurance company that keeps its policy tables in Postgres. You add an embedding column to the clauses table. A single query can then find the passage closest in meaning and JOIN to the customers table to pull the name and policy status.

There is no sync pipeline between two systems, so there is no way for the data in two places to drift apart.

One detail matters: by default pgvector performs exact nearest neighbor search, and the README states plainly that this gives perfect recall. Approximate indexes exist only if you create them, and there are two kinds. HNSW builds a multilayer graph, while IVFFlat divides the data into lists.

HNSW offers a better trade-off between speed and recall, at the cost of longer build times and more memory.

A sensible workflow, then, is to run exact search first to get a ground truth. Only after that, build HNSW and measure how many of the top 10 results the two methods share. That number tells you how much recall you traded for speed, and it is something you can show the client.

Two traps that can wreck a demo

The first trap is filtering. With an approximate index, pgvector applies filters after scanning the index. As a result, a query can return fewer rows than you expect.

Consider a multi-tenant system. You ask for the 10 nearest documents belonging to one small customer. The HNSW index pulls a set of nearest candidates from the whole dataset, then filters by tenant. If only 3 documents in that set belong to this tenant, the user gets 3 rows instead of 10.

The user concludes the chatbot “found nothing,” while the documents are still sitting in the database.

The second trap is dimensions. pgvector can store vectors of up to 16,000 dimensions, but HNSW is far stricter: for the vector type, it can index only up to 2,000 dimensions. If the client’s embedding model produces longer vectors, you can still store them but cannot build HNSW on the vector type.

Check this number as soon as you pick a model, rather than discovering it on the day you load real data.

When Qdrant justifies a new service

Qdrant uses a client-server model, with APIs over HTTP and gRPC, so it can be called from almost any language. Its unit of data is a point, made up of a vector and an optional metadata payload.

In the multi-tenant problem above, what sets Qdrant apart from pgvector is the payload index. You create indexes on specific fields such as tenant_id, and the filter is applied during the search itself. Qdrant does not wait until the search is finished to filter, as pgvector’s approximate indexes do. Qdrant also supports hybrid retrieval, combining dense vectors for searching by meaning with sparse vectors for searching by keyword.

That makes Qdrant worth considering when filtering is a core requirement, such as multi-tenancy with a great many small tenants, and the client is willing to run one more service. If nobody is on call for that service, the technical advantage becomes an operational burden.

Client already on Elasticsearch: use the existing cluster

If the client runs Elasticsearch for keyword search, Elastic’s documentation shows that dense vectors are queried with the knn query. That means you can add vector search to the cluster already in production. Elastic also describes how to combine vectors with full-text search for hybrid search.

Say an equipment distributor stores its technical documentation in Elasticsearch. A technician types: “PX-220 pump is loud on startup.” The PX-220 model number is something full-text search matches exactly, while “loud on startup” needs a search by meaning, because the documentation might say “abnormal noise.”

With vectors alone, results can drift to a different pump model with a similar description. With keywords alone, the system misses passages that use other words. Hybrid search handles both halves, but only if the two sets of scores are combined correctly.

Do not assume this is just a matter of adding a field. You still need a pipeline that generates embeddings for both old and new documents, you may have to reindex existing data, and you must choose how to combine vector scores with full-text scores. The advantage lies elsewhere: the cluster already has indexes, access control and people running it, so the risk is lower than standing up a new system.

The first thing to do is collect about 20 real queries that contain both a product code and a natural-language description. Run full-text alone, knn alone and then hybrid, and see which approach puts the right document at the top.

What the client has Try first What to check
Postgres pgvector Filtering after the index scan, HNSW’s 2,000-dimension limit
Nothing yet, needs strong filtering Qdrant Who will run the new service
Elasticsearch for keyword search knn query on the existing cluster Embedding pipeline, reindexing, combining vector and full-text scores

What to learn first

If you have only a week, learn pgvector, because a great many clients use Postgres. Focus on three things: comparing exact search with HNSW, reproducing the filter bug that returns too few results, and reading the dimension limits carefully. Then set up Qdrant with a payload index to see the same filtering problem solved a different way.

When reading FDE job descriptions, look for phrases such as “integrate with existing data infrastructure” or “RAG in production.” On a CV, “used vector database X” says little.

A line such as “measured recall between exact search and HNSW; found and fixed a filter bug returning incomplete results in a multi-tenant system” shows a hiring manager that you have worked with real data.

The best vector database for a project is usually the system the client already knows how to keep running. Move to something else only when you can measure a specific problem the existing system cannot solve.

Was this article useful?

Use with your AI assistantAsk Claude ↗Ask ChatGPT ↗
3 sources
Read next on the roadmap · Stage 3: Applied AIAt a client site, the hardest agent question is who clicks approveLangGraph's interrupt function stops an agent just before a refund, waits minutes or overnight for a human reviewer, then resumes from exactly the same point.