Back

Tradeoff Dashboard

There is no single "best" index. The right choice depends on your data size, latency budget, recall target, and memory constraints. Pick a dataset scale and hover the bubbles or cards to compare.

Dataset scale

Speed vs. Recall

Bubble size shows memory footprint — smaller bubble = more memory used.

FLAT

Brute force — compare against every vector.

Speed
50 qps
Recall@10
100%
Memory
300 MB
Build
instant
Best forTiny datasets or "ground truth" baselines.
Avoid whenAnything large — speed scales linearly with N.

IVF_FLAT

Cluster the data; search only the nearest clusters.

Speed
800 qps
Recall@10
95%
Memory
320 MB
Build
5s
Best forMedium datasets where you want exact distances within clusters.
Avoid whenVery high recall on large data — you must scan many clusters.

IVF_SQ8

IVF + 8-bit scalar quantization. ~4× less memory.

Speed
1.2k qps
Recall@10
93%
Memory
80 MB
Build
8s
Best forWhen IVF_FLAT does not fit in memory.
Avoid whenWhen you need maximum recall — quantization adds noise.

IVF_PQ

IVF + product quantization. Aggressive compression, ~16× smaller.

Speed
3.0k qps
Recall@10
80%
Memory
25 MB
Build
15s
Best forHuge datasets where memory is the bottleneck.
Avoid whenLatency-critical or high-recall workloads.

HNSW

Hierarchical graph. Best speed-recall trade-off in memory.

Speed
5.0k qps
Recall@10
98%
Memory
600 MB
Build
30s
Best forLatency-critical search with high recall and ample RAM.
Avoid whenMemory-constrained environments — uses ~1.5–2× the raw data.

DISKANN

Graph index that lives on disk. Trades latency for memory.

Speed
1.5k qps
Recall@10
96%
Memory
80 MB
Build
1 min
Best forBillion-scale datasets that cannot fit in RAM.
Avoid whenSmall datasets — disk I/O overhead outweighs benefits.

How to read the chart

  • Top-right is best: high speed AND high recall. Indexes drift down-and-right as data grows.
  • Big bubble = small memory. A small dot like HNSW at 10M means it eats RAM. PQ-based indexes stay fat (low memory).
  • FLAT is the ground truth. Always 100% recall but speed collapses as the data grows. Use it as the reference everyone else loses ground to.
  • Switch the scale to see how the same indexes shift. HNSW dominates at 100K but its memory bill becomes scary at 10M.

Decision shortcut: small data → FLAT or HNSW; medium data with RAM → HNSW; medium-to-large data with tight RAM → IVF_SQ8 or IVF_PQ; billion-scale → DiskANN. Always benchmark on your real data before committing.