Vector Databases

What They Do

Vector databases store, index, and query high-dimensional embedding vectors at scale. The defining operation is Approximate Nearest Neighbor (ANN) search: finding the k vectors most similar to a query vector among millions or billions of stored vectors, in milliseconds.

Traditional vs vector search

Traditional databases find data by exact match: "find the row where id = 42." Vector databases find data by similarity: "find the 10 vectors closest to this query vector." Fundamentally different retrieval model, requiring different algorithms.

Why ANN Indexing Exists

Brute-force search computes the similarity between the query and every stored vector. With 100 million vectors at 1536 dimensions each, this is too slow for production. ANN indexes build data structures during insert time that let search skip most vectors and examine only a carefully selected subset.

Tradeoff: ANN finds results 95–99% as accurate as brute force at 100x–1000x the speed. The small accuracy loss is acceptable for search use cases.

Major Vector Databases

1

Pinecone — Fully managed cloud vector database. No infrastructure management. Automatic scaling. Best for production with minimal ops overhead.

2

Weaviate — Open-source with built-in hybrid search, object storage, and automatic embedding. Self-hosted or cloud. Feature-rich.

3

Chroma — Open-source, developer-friendly. Easiest to get running locally. Best for development and prototyping.

4

FAISS — A library (not a database) providing highly optimized ANN indexes. Used as an engine inside other systems. Maximum speed, requires custom infrastructure.

5

Qdrant — Open-source with strong filtering support and multiple index types. Good balance of features and performance.

6

Supabase pgvector — Adds vector search to PostgreSQL. Best when you already use Postgres and want to avoid a new system.

How to Choose

Decision factors

Evaluate: scale (how many vectors?), latency (milliseconds per query?), filtering (do you need metadata filters?), deployment (managed or self-hosted?), and existing stack (already on Postgres?). There is no universally best choice — match the tool to your constraints.

Need Help?

Ask the AI assistant about vector databases, ANN indexing, or how to choose between Pinecone, Weaviate, Chroma, and pgvector.