MyVector — cross-version benchmark
MySQL 8.4 vs 9.7 vs 26.7 · HNSW vector search · generated 2026-10-12 04:50:42 UTC
A comparison of MyVector's native HNSW vector search across three MySQL versions
(plus MariaDB's native vector as a cross-engine reference) — same data and index parameters, each
pinned to an identical 4 vCPU / 24 GB slice (hardware noted below). It measures index build time,
insert throughput, exact KNN, approximate (ANN) QPS and latency, recall@10, and the
accuracy/throughput tradeoff as ef_search varies.
MySQL 8.4 · aarch64 · myvector-dev · Ampere A1MySQL 9.7 · aarch64 · myvector-dev · Ampere A1MySQL 26.7 · aarch64 · myvector-dev · Ampere A1MariaDB 12.3.3 · aarch64 · myvector-dev · Ampere A1
MySQL 8.4
Index build54.9s
Insert QPS3,670
ANN QPS543
Recall@100.820
MySQL 9.7
Index build56.7s
Insert QPS3,709
ANN QPS548
Recall@100.820
MySQL 26.7
Index build57.0s
Insert QPS3,711
ANN QPS529
Recall@100.820
MariaDB 12.3.3
Index build92.3s
Insert QPS542
ANN QPS257
Recall@100.948
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 | MySQL 9.7 | MySQL 26.7 | MariaDB 12.3.3 |
|---|
| Index build (s) | 54.9 | 56.7 | 57.0 | 92.3 |
| Insert QPS | 3,670 | 3,709 | 3,711 | 542 |
| Exact KNN QPS | 1 | 1 | 1 | 1 |
| KNN p50 (ms) | 750.3 | 714.8 | 713.4 | 701.0 |
| KNN p99 (ms) | 758.4 | 722.4 | 721.8 | 713.7 |
| ANN QPS | 543 | 548 | 529 | 257 |
| ANN p50 (ms) | 1.8 | 1.8 | 1.8 | 2.9 |
| ANN p99 (ms) | 2.1 | 2.1 | 2.1 | 20.5 |
| Recall@10 | 0.820 | 0.820 | 0.820 | 0.948 |
Accuracy / throughput tradeoff (ef_search sweep)
each point is an ef_search value; up-and-right is better
Notes & caveats
- Workload: 50,000 vectors · dim 128 · L2 · HNSW M=16, ef_construction=200 · 200 held-out queries. Identical synthetic data on every instance.
- Hardware: all four engines run on the same Ampere A1 host, each pinned to an identical 4 vCPU / 24 GB slice — so the numbers are directly comparable.
- MariaDB HNSW cache: run with
mhnsw_max_cache_size sized above the index. Its 16 MB default is smaller than the ~27 MB index and thrashes to disk — on this dataset ~15× slower on search and ~6× on build — so the default would be an unfair handicap. - Cross-engine: MariaDB uses its native VECTOR/HNSW index, built online during insert (build time = load time, no separate build phase or ef_construction) — a comparison against MyVector-on-MySQL, not a different MyVector build.