cong-cu Intermediate
What is a Vector Database?
A type of database specialized in storing and quickly searching vector embeddings — the foundation for RAG and semantic search.
Updated: May 5, 2026 · 2 min read
A Vector Database is a database type optimized for storing and searching millions of embedding vectors in just a few milliseconds.
Why does this need its own kind of DB?
Traditional databases (PostgreSQL, MySQL) search by exact match (WHERE name = 'X'). Vector DBs search by similarity (“which vector is most similar to this one?”).
If you have 10 million embedded documents, finding the nearest vector with brute force takes seconds. Vector DBs use ANN (Approximate Nearest Neighbor) algorithms like HNSW and IVF to bring it down to a few ms — at the cost of 1-2% accuracy.
Popular vector databases (2026)
Cloud / managed
| Name | Highlights | Starting price |
|---|---|---|
| Pinecone | Easiest to use, scales well | Small free tier, $70/month+ |
| Weaviate Cloud | Open source + cloud | Free tier, $25+ |
| Qdrant Cloud | Fast, Rust core | Free tier, $25+ |
| Turbopuffer | New, cheap, serverless | $0.10/GB/month |
Self-host
| Name | Highlights |
|---|---|
| Qdrant | Fast, easy to deploy |
| Weaviate | Has a GraphQL API |
| Milvus | Large scale, by Zilliz |
| Chroma | Lightweight, great for prototypes |
| pgvector | Postgres extension — no new DB needed! |
When you DON’T need a Vector DB
- < 100k vectors → use pgvector or even just a file
- You need absolute search precision → brute force is slow but correct
Typical workflow with RAG
1. Ingest: Documents → split into chunks → embed → store in vector DB
2. Query: User asks → embed the question → query top-k chunks
3. Augment: Inject the chunks into the prompt → LLM answers
How to choose
- Latency matters → pick Qdrant, Turbopuffer
- Already on Postgres → pgvector, no extra DB needed
- Need complex filters (geo, time, tag) → Weaviate
- Most generous free tier right now → Qdrant Cloud
Related
Tags
#vector-db#embedding#rag