Back to glossaryAI Foundations

Vector Database

Database specialized in storing and searching numerical vectors (embeddings) - essential for RAG, AI recommendations, semantic search.

What a vector database does

Different from classic databases (SQL searching by ID, MongoDB searching by keys), a vector database is optimized for semantic similarity search. It stores numerical vectors (embeddings) with hundreds or thousands of dimensions and quickly answers "find the 10 closest records to this vector" queries.

Why you need it

Embeddings are numerical representations of content (text, images, audio) that capture meaning. Two synonymous sentences have close vectors. That allows semantic search ("vacuum" finds "vacuum cleaner" and "robot vacuum") - impossible with classic SQL.

Popular options in 2026

  • Pinecone: most popular cloud, scalable, expensive at scale ($70-1000+/month).
  • Qdrant: open-source, self-hostable, excellent performance, free.
  • Supabase pgvector: built-in Postgres extension, perfect for projects already using Supabase. Generous free tier.
  • Weaviate: cloud + self-hosted, advanced hybrid search.
  • Milvus: enterprise-grade, scales to billions of vectors.

Concrete applications

  • RAG for AI chatbot - most common use
  • Product recommendations on e-commerce ("customers like you bought...")
  • Semantic search in internal documentation
  • Fraud and anomaly detection
  • Image similarity search
  • Content recommendation (videos, articles)

Typical costs

For SMB: Supabase pgvector free tier covers up to 100k-500k vectors. Above that: Pinecone $70/month starter or self-hosted Qdrant on Hetzner $10/month. For enterprise (1M+ vectors): $200-2000/month.

Frequently asked questions

Which embedding model to use?

+
OpenAI text-embedding-3-large for max quality ($0.13/1M tokens). Voyage-large-2 for multilingual (native Romanian). For min cost: text-embedding-3-small ($0.02/1M).

Pinecone vs Qdrant?

+
Pinecone: cloud-only, easy, expensive. Qdrant: open-source, self-hosted, free, more flexible. For SMB: Qdrant. For enterprise without ops: Pinecone.

Can I use Postgres as vector DB?

+
Yes, with pgvector extension. Good performance up to ~1M vectors. Above that, Pinecone/Qdrant win significantly in speed.

Vector dimensions - 384, 1024, 1536? What's the difference?

+
More dimensions = more info, more precise, but more expensive (storage + compute). 384 is enough for general semantic search. 1536 (OpenAI default) for demanding cases.

Related terms

Want to implement this in your business?

Book a free consultation