WhatDbShouldIUse
Akshith Varma Chittiveli Akshith Varma Chittiveli
6 min read

Best Database for Vector Search

You don’t feel the pain of vector search on day one.

Best Database for Vector Search

The problem

You don’t feel the pain of vector search on day one.

Your prototype works fine with a few thousand embeddings. Queries return in milliseconds. Everything looks simple.

Then scale hits.

  • Latency spikes unpredictably
  • Recall quality drops under load
  • Costs explode due to memory-heavy indexes
  • Filtering + search becomes painfully slow

Vector search isn’t just “store embeddings and query.” It’s a fundamentally different workload.


Why database selection is hard

Most engineers approach this like a SQL vs NoSQL decision.

That’s already the wrong abstraction.

Vector search introduces new constraints:

  • High-dimensional math (cosine / Euclidean similarity)
  • Approximate nearest neighbor (ANN) indexing
  • Hybrid queries (vector + metadata filters)
  • Memory-heavy execution patterns

Traditional databases weren’t designed for this.

And bolting vector support onto them often leads to architectural friction:

  • CPU exhaustion from hybrid queries
  • Poor index performance
  • Inefficient memory usage

At scale, these become system-level problems—not just query issues.


Core idea: this is a trade-off problem

There is no “best database for vector search.”

There are only trade-offs across three axes:

  • Latency vs Cost
  • Accuracy vs Throughput
  • Simplicity vs Capability

Vector databases optimize for different points on this spectrum.

The right choice depends on your workload—not the feature list.


Key concepts you need to understand

1. Vector search is not lookup—it’s computation

You’re not retrieving rows.

You’re computing similarity across high-dimensional space.

That means:

  • CPU/GPU matters
  • Index structure matters more than storage
  • Query complexity grows fast

2. Index type defines performance

Two dominant patterns:

  • HNSW (Hierarchical Navigable Small World)

    • High accuracy
    • Low latency
    • Memory-heavy
  • IVF (Inverted File Index)

    • Scales better
    • Lower memory usage
    • Slightly lower recall

Your database choice is often a proxy for which index strategy you need.


3. Hybrid queries are the real bottleneck

Most real systems need:

  • “Find similar documents”
  • AND filter by metadata (user_id, time, category)

This is where many systems break.

A good vector database must:

  • Combine ANN search with structured filtering efficiently
  • Avoid full-scan fallback
  • Execute both in the same query planner

This is a top-tier requirement for RAG systems


4. Memory is your real constraint

Vector indexes are RAM-heavy.

At scale:

  • Your cost is driven by memory, not storage
  • Latency is tied to how much fits in memory

This leads to a critical trade-off:

Accept expensive RAM-bound scaling for ultra-low latency OR trade latency for cost efficiency


Decision framework: how to choose a database for vector search

Step 1: Define your workload

Ask:

  • Is this real-time (user-facing) or offline (batch retrieval)?
  • Do you need strict latency (<50ms)?
  • How large is your dataset (1M vs 1B vectors)?

Step 2: Understand query complexity

  • Simple similarity search → easier
  • Hybrid (vector + filters) → harder
  • Multi-hop reasoning (RAG agents) → very hard

If you’re building AI agents, query complexity becomes the dominant factor


Step 3: Choose your scaling model

  • Vertical scaling (RAM-heavy, fast)
  • Horizontal scaling (distributed, complex)

Vector search doesn’t shard cleanly. Distribution adds complexity.


Step 4: Decide architecture

You typically choose between:

Option A: Purpose-built vector database

Examples: Pinecone, Weaviate, Milvus, Qdrant

Best when:

  • Vector search is core to your system
  • You need optimized indexing + retrieval
  • You want built-in ANN + filtering

Trade-offs:

  • Operational overhead
  • Cost at scale
  • Vendor lock-in (managed options)

Option B: Extend existing database

Examples:

  • PostgreSQL + pgvector
  • Elasticsearch / OpenSearch

Best when:

  • You already have an existing stack
  • Vector search is secondary
  • Simplicity matters more than peak performance

Trade-offs:

  • Limited performance at scale
  • Hybrid query inefficiencies
  • Index limitations

Option C: Split architecture (recommended at scale)

  • Primary DB → transactional data
  • Vector DB → embeddings + search

This avoids:

  • Overloading your main database
  • Mixing incompatible workloads

How workload changes the decision

1. RAG / AI applications

Priorities:

  • Low-latency retrieval
  • Hybrid queries
  • High recall

Best fit:

  • Purpose-built vector DB

Why: Vector search is the core system, not a feature.


2. Search + filters (e.g., product search)

Priorities:

  • Strong filtering
  • Moderate vector usage

Best fit:

  • Elasticsearch / OpenSearch

Why: Filtering + text search + vector = balanced workload


3. Small-scale embeddings (MVPs)

Priorities:

  • Simplicity
  • Low cost

Best fit:

  • PostgreSQL + pgvector

Why: Avoid premature complexity


4. Large-scale semantic systems (100M+ vectors)

Priorities:

  • Memory efficiency
  • Distributed indexing
  • Cost control

Best fit:

  • Milvus / Qdrant / custom infra

Why: You need control over scaling and index tuning


Common mistakes engineers make

1. Treating vector search like a feature

It’s not.

It’s a different computational workload.


2. Ignoring hybrid queries

Most systems fail here—not on similarity search.


3. Choosing based on benchmarks

Benchmarks don’t reflect:

  • Your filters
  • Your data distribution
  • Your query patterns

4. Underestimating cost

Vector search is memory-bound.

Costs grow faster than expected.


5. Over-optimizing early

You don’t need Milvus for 10K vectors.

Start simple.


Practical takeaway

Think of vector search as a specialized compute system, not just storage.

Your mental model should be:

  • Storage = embeddings
  • Compute = similarity + filtering
  • Index = performance

And the key question becomes:

Where do you want to pay the cost—latency, money, or complexity?


Final thought

If you’re trying to figure out how to choose a database for your application, vector search is one of the clearest examples of why this is a trade-off problem.

There’s no universally “best database for application” here.

Only the best fit for your workload.

If you want a structured way to evaluate these trade-offs across different systems, you can use a framework like the one at:

https://whatdbshouldiuse.com

It helps translate your workload into concrete database choices—without guesswork.