Choosing a Vector Database for Production

A decision checklist covering scale, filtering, operations and cost.

Last Updated: 27, Nov 2026

Search Tutorials

--Ads--

Module 6 · Lesson 12 of 13 · Intermediate

Choosing a Vector Database for Production

A decision checklist covering scale, filtering, operations and cost.

There are dozens of vector databases, and their marketing pages all claim to be the fastest. For most RAG projects the choice is less dramatic than it looks: several options will work, and the deciding factors are usually your scale, your filtering needs and what your team already operates. This lesson gives you a practical checklist and a set of sensible defaults.

Start with what you already run

An extra database is an extra system to secure, back up, monitor and upgrade. If you already run PostgreSQL, Elasticsearch, OpenSearch, MongoDB or Redis, check its vector features first. pgvector in particular handles millions of vectors well and lets you join chunks with your application data in SQL.

The checklist

QuestionWhy it matters
How many vectors now, and in two years?Below a few million, almost anything works. At hundreds of millions, architecture and cost dominate.
How much filtering, and how selective?Heavy or highly selective filters need a database that filters inside the ANN search.
Do you need hybrid (keyword + vector) search?Some databases have built-in BM25 or sparse vectors; with others you run a second system.
How often does data change?Constant updates and deletes stress some index types.
Latency and throughput targets?Queries per second at your p95 latency target decide hardware and replicas.
Multi-tenancy?Look for tenant-aware indexing or cheap per-tenant collections.
Self-hosted or managed?Managed services trade cost for zero operations work.
Data residency and compliance?Some data must stay on your servers or in a region.
Ecosystem support?Check integrations with your framework (LangChain, LlamaIndex, Haystack).

Sensible defaults

SituationReasonable choice
Learning, prototypes, notebooksNumPy or FAISS in memory; Chroma or LanceDB for persistence
Application already on PostgreSQL, up to tens of millions of vectorspgvector
Search-heavy product with strong keyword needsElasticsearch or OpenSearch with vector fields
Dedicated RAG platform, rich filtering, hybrid search, growthQdrant, Weaviate or Milvus (self-hosted or their cloud)
Small team, no wish to operate infrastructureA managed service such as Pinecone or the cloud editions of the above
Billions of vectorsMilvus, Vespa or a managed service designed for that scale, with quantization and sharding

Keep your code portable

Hide the vector store behind a small interface of your own. Switching databases, or running two side by side during a migration, then touches one file instead of your whole codebase.

from typing import Protocol
import numpy as np

class VectorStore(Protocol):
    def upsert(self, ids: list[str], vectors: np.ndarray, texts: list[str], metadata: list[dict]) -> None: ...
    def delete(self, doc_id: str) -> None: ...
    def search(self, vector: np.ndarray, k: int, filters: dict | None = None) -> list[dict]: ...


class ChromaStore:
    def __init__(self, path: str, name: str):
        import chromadb
        self.col = chromadb.PersistentClient(path=path).get_or_create_collection(name)

    def upsert(self, ids, vectors, texts, metadata):
        self.col.upsert(ids=ids, embeddings=vectors.tolist(), documents=texts, metadatas=metadata)

    def delete(self, doc_id):
        self.col.delete(where={"doc_id": doc_id})

    def search(self, vector, k, filters=None):
        r = self.col.query(query_embeddings=[vector.tolist()], n_results=k, where=filters or None)
        return [{"id": i, "text": t, "metadata": m, "distance": d}
                for i, t, m, d in zip(r["ids"][0], r["documents"][0], r["metadatas"][0], r["distances"][0])]

Benchmark with your own workload

Public benchmarks (such as ANN-Benchmarks or vendor-published results) use specific datasets, hardware and settings. Before committing, load a realistic sample of your data (with your metadata and filters) into two or three candidates and measure recall, p95 latency, indexing time and memory. One day of testing can save months of migration later.

Remember

Retrieval quality depends far more on parsing, chunking, embeddings, hybrid search and reranking than on which vector database stores the vectors. Do not let database selection delay work on those.

Key takeaways

  • Prefer the database you already operate if its vector support meets your needs.
  • Decide on scale, filtering, hybrid search, update rate, tenancy and hosting model.
  • Wrap the store in your own interface to keep the choice reversible.
  • Benchmark candidates on your own data and filters before committing.