MyVector — real-dataset benchmark
MySQL 8.4 / 9.7 / 26.10 + MariaDB 12.3 · fashion-mnist-784 · published ground truth · generated 2026-11-06 12:02:35 UTC
cross-engine · MySQL version comparison
MyVector's native HNSW vector search on a real ann-benchmarks dataset (fashion-mnist-784-euclidean: 60,000 × 784-d image embeddings, L2), scored against the dataset's published exact ground truth — the ann-benchmarks recall methodology, not a brute-force self-check. Queries come from the dataset's held-out test set (never indexed). Same engines and hardware as the synthetic dashboard; this one answers "what recall/throughput do you actually get on real embeddings?"
MySQL 8.4 · aarch64 · myvector-dev (A1 16/96)MyVector 8.4 · PR #278 (NEON) · aarch64 · myvector-dev (A1 16/96)MySQL 9.7 · aarch64 · myvector-dev (A1 16/96)MyVector 9.7 · PR #278 (NEON) · aarch64 · myvector-dev (A1 16/96)MySQL 26.10 · aarch64 · myvector-dev (A1 16/96)MyVector 26.10 · PR #278 (NEON) · aarch64 · myvector-dev (A1 16/96)MariaDB 12.3 · MHNSW · aarch64 · myvector-dev (A1 16/96)
MySQL 8.4
Index build82.5s
Insert QPS1,162
ANN QPS349
Recall@100.999
MyVector 8.4 · PR #278 (NEON)
Index build46.4s
Insert QPS1,150
ANN QPS434
Recall@100.999
MySQL 9.7
Index build83.1s
Insert QPS1,164
ANN QPS355
Recall@100.999
MyVector 9.7 · PR #278 (NEON)
Index build46.2s
Insert QPS1,139
ANN QPS438
Recall@100.999
MySQL 26.10
Index build85.0s
Insert QPS1,140
ANN QPS354
Recall@100.999
MyVector 26.10 · PR #278 (NEON)
Index build45.1s
Insert QPS1,147
ANN QPS444
Recall@100.999
MariaDB 12.3 · MHNSW
Index build245.5s
Insert QPS244
ANN QPS585
Recall@101.000
Head-to-head (normalized — taller is better on every metric)
each metric scaled to the best performer = 100%; build time & ANN latency inverted so taller always means better
Full metrics
| Metric | MySQL 8.4 | MyVector 8.4 · PR #278 (NEON) | MySQL 9.7 | MyVector 9.7 · PR #278 (NEON) | MySQL 26.10 | MyVector 26.10 · PR #278 (NEON) | MariaDB 12.3 · MHNSW |
|---|
| Index build (s) | 82.5 | 46.4 | 83.1 | 46.2 | 85.0 | 45.1 | 245.5 |
| Insert QPS | 1,162 | 1,150 | 1,164 | 1,139 | 1,140 | 1,147 | 244 |
| Exact KNN QPS | 0 | 1 | 0 | 1 | 1 | 1 | 0 |
| KNN p50 (ms) | 3,991.4 | 1,361.3 | 3,633.9 | 1,412.5 | 1,621.7 | 1,631.3 | 4,930.9 |
| KNN p99 (ms) | 4,435.4 | 1,705.5 | 4,229.2 | 1,684.2 | 1,845.9 | 2,032.4 | 5,353.3 |
| ANN QPS | 349 | 434 | 355 | 438 | 354 | 444 | 585 |
| ANN p50 (ms) | 2.8 | 2.3 | 2.8 | 2.3 | 2.8 | 2.2 | 1.6 |
| ANN p99 (ms) | 3.5 | 2.7 | 3.4 | 2.7 | 3.4 | 2.6 | 3.3 |
| Recall@10 | 0.999 | 0.999 | 0.999 | 0.999 | 0.999 | 0.999 | 1.000 |
Accuracy / throughput tradeoff (ef_search sweep)
each point is an ef_search value; up-and-right is better
QPS at matched recall@10
the honest read of the sweep: at a target recall, who serves the most queries/sec? interpolated from each engine's own curve; bold = fastest at that recall, higher is better. — = that engine's index can't be tuned to this recall (e.g. a graph that saturates near 1.0 can't operate lower).
| Recall@10 | MySQL 8.4 | MyVector 8.4 · PR #278 (NEON) | MySQL 9.7 | MyVector 9.7 · PR #278 (NEON) | MySQL 26.10 | MyVector 26.10 · PR #278 (NEON) | MariaDB 12.3 · MHNSW |
|---|
| recall 0.95 | 565 | 324 | 576 | 325 | 488 | 620 | — |
| recall 0.97 | 554 | 523 | 561 | 520 | 540 | 611 | — |
| recall 0.98 | 544 | 603 | 548 | 598 | 555 | 603 | — |
| recall 0.99 | 508 | 577 | 514 | 575 | 519 | 575 | — |
| recall 0.995 | 489 | 564 | 497 | 563 | 500 | 560 | — |
| recall 0.999 | 349 | 434 | 355 | 438 | 354 | 444 | 1,263 |
Notes & caveats
- ⚡ Kernel optimization in review (PR #278): MyVector's HNSW distance kernel was running scalar on every build/arch (hnswlib's SIMD is x86-only and gated off; GCC won't auto-vectorize the float reduction at -O3). Vectorizing it to NEON/SSE (a scoped reassociation pragma, pgvector's flags) gives, in a same-session A/B on this host/dataset (two freshly-built 8.4 components, median of scalar n=3 / SIMD n=6 clean runs, identical recall):
| metric | scalar | SIMD | Δ |
|---|
| index build | 83.8 s | 45.6 s | 1.84× faster |
| QPS @ recall 0.997 (ef=50) | 487 | 553 | +14% |
| QPS @ recall 0.999 (ef=200) | 352 | 434 | +23% |
| QPS @ recall 1.000 (ef=800) | 203 | 278 | +37% |
All three · PR #278 (NEON) series (brighter colors) plot the measured optimized builds on the same A1 host/slice — a direct before/after against each scalar version. Optimized medians: 8.4 82.5s→46.4s build, ef=200 352→434 QPS; 9.7 82→46s, 355→438; 26.10 82→45s, 354→444 — all recall@10 0.999. The muted scalar series are the pre-optimization builds still in main (until PR #278 merges). The gain grows with ef_search (more distance evals per query); it does not fully close the gap vs pgvector at low ef, which is per-query execution overhead, tracked separately. - Dataset:
fashion-mnist-784-euclidean (ann-benchmarks) — 60,000 train × 784-d, 10,000 held-out test queries, L2/Euclidean. Index HNSW M=16, ef_construction=200. - Recall@10 vs published ground truth: each query is scored against the dataset's published exact top-10 neighbors, so recall is directly comparable to ann-benchmarks numbers — not the brute-force self-check the synthetic dashboard uses.
- ef_search sweep 10→800 is measured warm (a discarded warmup pass runs first). The headline ANN QPS / latency / recall@10 cards and table are taken from the warm ef_search=200 sweep point, so every engine is compared at the same operating point. MyVector loads its whole index into memory at build; MariaDB warms its
mhnsw graph cache lazily over the first ~1k queries, so a cold first-query measurement would understate it. - Exact KNN is the brute-force baseline (full scan, ~0.3 QPS at 60k×784) — it exists to show how much the HNSW index buys you, not as a practical option.
- MariaDB cache:
mhnsw_max_cache_size raised to 1 GiB (its 16 MB default thrashes to disk). MariaDB builds HNSW online during insert, so its "index build" is load time (no separate build phase) — much slower here (~240 s) but, once warm, its search is competitive-to-faster than MyVector on this dataset at recall ≈ 1.0. - MariaDB ef_search floor: MariaDB floors
mhnsw_ef_search to ~2×M (≈32), so an ef_search=10 request is not a valid operating point for it — that point is omitted from MariaDB's plotted curve (its measured value is kept in the result JSON under ef_search_excluded). Every other engine applies no such floor, so their ef_search=10 points are plotted as-is. MariaDB's remaining curve (ef≈20→800) is monotonic once each point is warmed per-ef; the headline uses the warm ef=200 point. - Hardware: all engines on the same Ampere A1 host, each pinned to an identical 4 vCPU / 24 GB slice. 26.10 is the current MySQL Innovation release.