Contents
At a glance
- Category
- Agent concept - retrieval
- Core operation
- Approximate nearest neighbour search over stored vectors
- Common index
- HNSW - held in memory, which makes RAM the binding constraint
- Simplest option
- pgvector in a Postgres you already run
- Must support
- Metadata filtering and hybrid keyword-plus-vector search
- Treat it as
- A rebuildable derived index, not the source of truth
What a vector database is
A vector database is storage optimised for one question: given this vector, which stored vectors are closest? Comparing a query against every stored vector is exact but slow, so these systems use approximate nearest neighbour indexes - HNSW is the most common - that trade a small amount of recall for enormous speed. Alongside each vector they hold the original text and metadata, so a result can be filtered by customer, date or document type and then read.
They exist because RAG needs sub-second retrieval over collections too large to scan. Everything else - hybrid search, filtering, namespaces - is built around that core.
The options, honestly
Three shapes. Extensions to a database you already run: pgvector for Postgres, plus similar options in SQLite and other engines. If your data is already in Postgres, this is usually the right answer - one system to operate, transactional consistency, and metadata filtering in plain SQL. Dedicated services like Pinecone, Weaviate, Qdrant and Milvus, available managed or self-hosted, which win on scale, hybrid search and operational features. Search engines with vector support, such as Elasticsearch and OpenSearch, which are a natural fit if you already run one.
For a small business with a few thousand documents, the honest answer is often none of them: an in-memory index rebuilt on deploy, or keyword search, is simpler and fast enough. Scale is the thing that justifies the extra system, and most businesses reach for it long before they need it.
Cost and operational reality
Managed services price on stored vectors, dimensions and query volume; self-hosting trades that for memory, because HNSW indexes are held in RAM and memory is the binding constraint. Either way, cost scales with vector count times dimensions, which is why models that let you shorten embeddings matter at scale.
Two operational details bite people. Re-indexing: if you change embedding model you re-embed and reload everything, so plan for a full rebuild rather than an in-place migration. Freshness: something has to notice a document changed and update its vectors, and a stale index answering confidently is worse than no index, because nobody knows it is stale.
What you should know
Pure vector search is not enough on its own. Production systems combine keyword and vector results and then apply reranking, because semantic similarity is weak on exact identifiers and strong on paraphrase, and real questions contain both. Check that whatever you choose supports hybrid search and metadata filters before you commit - retrofitting either is painful.
Finally, treat the store as a cache of your documents, not as the source of truth. The authoritative copy stays in the system that owns it; the vector store is a derived index you can rebuild. That framing makes the re-indexing question routine rather than frightening, and it keeps data residency commitments tractable.
Vector database FAQ
What is a vector database used for?
Finding the stored passages most similar in meaning to a query, fast enough to sit inside a live request. It is the retrieval engine behind RAG, semantic search, recommendation and deduplication, and it stores the source text and metadata alongside each vector so results can be filtered and read.
Do I need a dedicated vector database?
Often not. If your data lives in Postgres, pgvector gives you vector search inside the database you already operate, with SQL filtering and transactional consistency. Dedicated services earn their place at large scale, or when you need hybrid search and operational features out of the box.
How much does a vector database cost?
Managed services charge on stored vectors, dimensions and query volume; self-hosting mainly costs memory, because the index sits in RAM. Cost scales with vector count multiplied by dimensions, so shorter embeddings and tighter chunking both reduce the bill directly.
What happens when I change my embedding model?
You re-embed and reload the entire collection. Vectors from different models are not comparable, so there is no incremental migration. Plan a full rebuild, and keep the source documents accessible so the rebuild is a routine job rather than an emergency.
Is vector search better than keyword search?
They are good at different things. Vector search handles paraphrase and intent; keyword search handles exact identifiers, product codes and names. Production systems run both and merge the results, then rerank. Choosing only one is the usual cause of a retrieval system that feels unreliable.
How do I keep the index up to date?
Trigger re-embedding when the source document changes - a webhook from your document system, or a scheduled job that compares modification dates. A stale index is the worst failure mode because it answers confidently with old information and nothing signals that anything is wrong.
Primary source
Pinecone - what is a vector database
Checked August 2026. Anything priced or rate-limited moves, so verify against the source before you budget.
Want this built rather than explained?
Knowing what vector database means is one thing; having it running in your business is another. We scope one workflow at a time, quote a fixed price in writing after a free consult, build it, and hand it over with documentation you own.
