Short answer
No single database is fastest in every case. Speed depends on the workload, the schema and indexes, the queries, the configuration, the hardware and the software version.
MySQL 8.0 and MariaDB 10.6 are both past end of life, so any test should use current releases, such as MySQL 8.4 or 9.7 LTS, or MariaDB 11.8 or 12.3 LTS.
Why “fastest” depends on the job
- Lookups by primary key behave differently from large joins or analytical scans.
- Write-heavy work depends on storage speed, transaction settings and locking.
- Many concurrent users stress a server differently from one long-running query.
- Data size matters, especially whether the working data fits in memory.
How to compare fairly
- Use the same hardware, operating system and storage for each server.
- Load the same data with the same schema, indexes and character set.
- Run your real queries, and compare their execution plans with
EXPLAINon each server. - Repeat each test several times, and discard the warm-up runs.
- Change one thing at a time, such as a configuration setting or an index.
Reading published benchmarks
Benchmarks from a vendor, a project or a competitor often show that party’s strengths. MariaDB publishes its own performance comparison with MySQL, for example. Check the versions, hardware, data size and settings before you draw a conclusion, and remember that a benchmark does not measure your application.
How MariaDB and MySQL compare on speed
Readers often ask “Is MariaDB faster than MySQL?” There is no general answer. Both servers use InnoDB for most tables, so their core behavior is similar. Differences in query optimizers, default settings and the extra storage engines that MariaDB offers can change results for specific queries, in either direction.
What usually makes the biggest difference
Good indexes, queries that read only the rows they need, and memory settings that suit the workload can matter more than the choice between two servers. When a query is slow, look at its execution plan first.
Record the versions and settings with each result, so the comparison can be repeated later.