--- title: "What is a vector database?" excerpt: "A vector database stores embeddings and finds the nearest ones fast. Useful — but most teams reach for a dedicated one months before they actually need it." definition: "A vector database is a store optimized for indexing high-dimensional embedding vectors and running fast approximate nearest-neighbor search to retrieve the most semantically similar items to a query." date: "2026-07-09" lastModified: "2026-07-09" author: "Teo Deleanu" authorAvatar: "/team/teo.jpg" tags: ["RAG", "AI Engineering", "Vector Databases", "Retrieval"] keywords: - "what is a vector database" - "vector database for RAG" - "do I need a vector database" --- A vector database stores [embeddings](/glossary/embeddings) and answers one question very quickly: given this query vector, which stored vectors are closest? That nearest-neighbor search is the retrieval engine underneath [RAG](/glossary/retrieval-augmented-generation) and semantic search. ## Why it matters in production At scale, brute-force comparison against millions of vectors is too slow, so these systems use approximate nearest-neighbor indexes that trade a little recall for a lot of speed. The database also handles metadata filtering — "only search documents this user can see" — which turns out to be where a lot of real-world correctness lives. ## The common mistake Buying a dedicated vector database too early. If you already run Postgres, `pgvector` often carries a small-to-medium corpus fine, and you have deleted an entire system from your architecture instead of adding one that must be provisioned, backed up, and kept in sync with your source of truth. We wrote the tradeoff up in detail: [pgvector vs Pinecone](/compare/pgvector-vs-pinecone). ## How we actually use it We start with the simplest store that works and only graduate to a dedicated engine when index build time, memory pressure, or write churn shows up in metrics. When the corpus does justify it, the choice between the popular managed and self-hosted options matters less than people think — see [Pinecone vs Weaviate vs Qdrant](/compare/pinecone-vs-weaviate-vs-qdrant). Whatever the store, a [reranking](/glossary/reranking) pass on top usually buys more accuracy than switching databases.