TopDev
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.

Cloud / managed

NameHighlightsStarting price
PineconeEasiest to use, scales wellSmall free tier, $70/month+
Weaviate CloudOpen source + cloudFree tier, $25+
Qdrant CloudFast, Rust coreFree tier, $25+
TurbopufferNew, cheap, serverless$0.10/GB/month

Self-host

NameHighlights
QdrantFast, easy to deploy
WeaviateHas a GraphQL API
MilvusLarge scale, by Zilliz
ChromaLightweight, great for prototypes
pgvectorPostgres 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
Tags
#vector-db#embedding#rag