Short answer: neither is faster in every case
No. MariaDB is not consistently faster than MySQL, and MySQL is not consistently faster than MariaDB. Speed depends on the version of each server, the workload, the hardware, the configuration and the schema. Published tests point in different directions, and a test run by one of the vendors can favor that vendor’s product.
Where the two came from
MariaDB started in 2009 as a community fork of MySQL, led by Michael “Monty” Widenius, one of MySQL’s original developers. The fork began around the time Oracle agreed to buy Sun Microsystems, which owned MySQL at the time.
The two servers started from the same code, so they are compatible in many common ways. They have diverged over time, though, and features, default settings and optimizations differ between versions. A result that holds for one version may not hold for another.
What published benchmarks show
Benchmark results vary a lot. Some recent tests favor MariaDB on certain read-heavy or high-concurrency workloads. Others show MySQL ahead on other workloads, and some show a newer release running slower than an older one. Newer releases do not always beat older ones.
Results depend on the benchmark tool, the size of the test data, the hardware, the settings and the exact versions tested. A benchmark run by a vendor may test scenarios that suit that vendor’s product, so read the setup before you trust the headline result.
What really changes speed
- Workload. Read-heavy and write-heavy workloads stress a server in different ways. So do simple key lookups and complicated joins, and so does a large number of sessions running at once.
- Configuration. Memory settings, such as the InnoDB buffer pool size, can change throughput a lot.
- Schema and indexes. Good indexes and table design can matter more than the name of the server.
- Queries. A poorly written query is slow on either server.
- Hardware and hosting. Disk speed, memory and network latency all affect the result.
How to test both on your own workload
A fair comparison uses your own data and queries, not a generic benchmark:
- Copy a data set that is close in size and shape to production.
- Run the queries and the load you actually expect, using the same hardware and settings for both servers.
- Change one setting at a time, and rerun the test after each change.
- Look at slow responses as well as the average, because a few slow requests can hurt users more than a good average helps them.
- Repeat each run to see how much the results vary.
If you are deciding between the two servers beyond speed, compare their features and support dates too. “Which is better, MySQL or MariaDB?” covers that wider comparison. A broader version of this question is “Which database is fastest?”, and the same caveats apply.