Performance¶
How fast MyVector's HNSW search is, and how much accuracy you trade for speed.
Measured on MyVector (plugin, MySQL 8.4) with 100,000 GloVe 6B 50d vectors and 1,000 queries that are not in the index (Cosine distance, k = 10), on 2026-09-29 at commit 4b0789f. Host: 8-core Arm Neoverse-N1 (aarch64), 46 GB RAM.
All numbers on this page come from
docs/data/performance.json.
Recall vs throughput¶
Each point is one ef_search setting: the lowest is the fastest, the highest the most
accurate. Recall@10 is the share of the true 10 nearest neighbours that the search returns.
| ef_search | recall@10 | QPS | p50 ms | p99 ms |
|---|---|---|---|---|
| 10 | 0.809 | 1,204 | 0.8 | 1.0 |
| 20 | 0.907 | 1,124 | 0.9 | 1.1 |
| 50 | 0.974 | 1,002 | 1.0 | 1.2 |
| 100 | 0.992 | 832 | 1.2 | 1.4 |
| 200 | 0.999 | 612 | 1.7 | 1.9 |
| 400 | 1.000 | 481 | 2.1 | 2.6 |
ef_search is how many candidate neighbours the HNSW search keeps while it walks the index
graph. Higher values find more of the true nearest neighbours (higher recall) but take longer
per query. Set it per query with MYVECTOR_IS_ANN(index, key, vector, 'nn=10,ef_search=N');
queries without it use the index's own setting. QPS here is measured through the mysql
client in Docker, one query at a time, so treat it as relative between ef_search values.
For absolute numbers, run the benchmark against a host mysqld (below).
Latest release¶
Release v1.26.9 in CI (synthetic, 10,000 rows × 128 dimensions, GitHub-hosted runners): index build and insert throughput for each supported MySQL version and build.
| MySQL / build | Index build | Insert QPS | recall@10 |
|---|---|---|---|
| 8.4 plugin | 2.95 s | 3,707 | 0.978 |
| 8.4 component | 2.67 s | 3,942 | — |
| 9.7 component | 2.64 s | 3,916 | — |
| 26.7 component | 2.53 s | 4,062 | — |
"—" means no recall was measured: component builds from v1.26.9 and earlier don't have the
query rewrite that MYVECTOR_IS_ANN needs (#156).
Search QPS from these CI runs isn't shown, because up to v1.26.9 it mostly measured Docker
overhead (#124).
Comparison with MariaDB (2025)
A one-off comparison with MariaDB on the ann-benchmarks gist-960-euclidean and
dbpedia-openai-1000k-angular datasets, run in February 2025 on a pre-1.0 build. It used
different data, hardware and settings, so its numbers can't be compared with the ones
above. See MariaDB Comparison (2025).
Test environment and method
- Queries: sent one at a time. They are held out from the dataset by a seeded shuffle and never inserted, so no query finds itself.
- Index: HNSW, M = 16, ef_construction = 200. Recall is measured against an exact brute-force top 10.
- Release results: the
myvectorbenchworkflow on eachv*tag, stored on thebenchmarksbranch.
To reproduce the sweep:
python3 scripts/myvectorbench.py --config myvectorbench-glove.yml \
--mysql-version 8.4 --build-path plugin --artifact-dir dist/plugin-8.4 \
--image ghcr.io/askdba/myvector:mysql8.4 --output glove-sweep.json
Full write-up, including both runs and their latency: ef_search Sweep.
Run the benchmark on a host mysqld
By default myvectorbench.py runs MySQL in Docker. With --server host it downloads
Oracle's generic Linux tarball for the exact patch release the MyVector build targets
(8.4.8, 9.7.0, 26.7.0), starts an isolated mysqld from it (its own datadir, port and
socket, listening on 127.0.0.1 only) and times each query over one persistent
connection, measured on the client, so the numbers include the whole round trip and
nothing else: a SELECT 1 costs about 0.1 ms. Each result records the machine (CPU, cores, memory,
kernel) and the round trip as select1_p50_ms.
Host mode needs the MySQL Python driver (pip install mysql-connector-python; Docker
mode doesn't). The harness checks for it before downloading anything.
One command runs every cell in myvectorbench.yml (plugin 8.4, components 8.4, 9.7
and 26.7). Put the tarball cache and the run directories on a data volume, as they
take several GB:
python3 scripts/myvectorbench.py --server host --all-cells \
--artifact-root dist --cache-dir /data/mysql/tarballs \
--workdir-root /data/mysql/bench --output-dir /data/build/bench-host
- Artifacts:
dist/component-<ver>/fromscripts/build-component-<ver>-docker.sh. For the plugin usescripts/build-plugin-8.4-docker.sh mysql-8.4.8 dist/plugin-8.4-ol9, built with the same Oracle Linux 9 toolchain as Oracle's binaries, so it loads into the tarballmysqld;--all-cellsprefersplugin-8.4-ol9/overplugin-8.4/. - Results go under
<output-dir>/<machine-key>/(for exampleaarch64-neoverse-n1-16c/), so baselines from different machine types stay apart.myvectorbench-compare.pywarns when the baseline comes from another machine type or from a Docker run. - Single cell:
--server host --mysql-version 9.7 --build-path component --artifact-dir dist/component-9.7.--mysql-basediruses an already extracted or source-built server instead of downloading;--keep-workdirkeeps the datadir and error log. - Ubuntu 24.04 only has
libaio.so.1t64; the harness links it aslibaio.so.1in the run directory formysqld, without touching the system. - CI still uses Docker; GitHub runners are shared hardware, so their numbers are only relative.