Subscribe / Unsubscribe Enewsletters | Login | Register

Pencil Banner

MySQL face-off: MySQL or MariaDB?

Sean Hull | Aug. 14, 2013
MariaDB challenges MySQL with greater performance, more advanced features, and complete backward compatibility.

You may have heard about the upstart MySQL database MariaDB, a branch of MySQL created in the wake of Oracle's purchase of Sun Microsystems. You'll find many great reasons to consider MariaDB, not least that MariaDB is led by the original author of MySQL, Monty Widenius. But there are reasons to stick with MySQL too.

It's best to think about this decision in terms of the community you'll be turning to for support and bug resolution. For example, if you want to purchase a support contract and feel that Oracle support is your best avenue for problem resolution, you should surely go with MySQL. Also, if you're considering an upgrade to MySQL Cluster CGE (Carrier Grade Edition) down the road, you'll want to start with Oracle's community edition.

The choice will probably depend a lot on your team and their familiarity with the open source culture. If they're more comfortable having a support contract and official answers from Oracle's call center, go with MySQL.

Feels like MySQL
For MySQL users who are considering a move away from Oracle's version, compatibility is the foremost concern. That's why knowing that MariaDB is a complete drop-in replacement is key. What does it mean?

Although the package names differ, when you check them out of the repository, most everything else remains the same. Binary names of command-line tools, such as mysqladmin, mysqldump, mysql shell, and the daemon all retain the same names. What's more, the data files are completely compatible. MariaDB will work "out of the box" with the data files and table definitions of your existing MySQL instance.

Day-to-day advantages
What's great about a drop-in replacement is that your application doesn't need to change one bit. In the case of replacing MySQL with MariaDB, you'll immediately enjoy performance advantages. Community improvements from Facebook, Twitter, Google, and Percona all roll into MariaDB sooner than they appear in MySQL.

MariaDB also provides user statistics and better instrumentation through the data dictionary information schema, including microsecond support. If you're using TIME or DATETIME data types, you can specify precision, such as TIME(4), where the number represents the number of digits after the decimal place. MariaDB supports up to six digits -- for example, 0.000001 second or one microsecond. No more wondering how fast is fast. For those cases where precision is not specified, MariaDB defaults to 0 for easy backward compatibility -- nice!

Have you ever waited in frustration while executing a long-running ALTER TABLE in MySQL? MariaDB gives you a command-line progress indicator of such operations so that you can plan ahead. Welcome changes indeed!

Query execution is typically a big challenge for Web-facing applications. The brains behind query execution in MySQL is the query optimizer, and here too MariaDB offers serious improvements, including better subquery optimization, as well as faster, more efficient, and more consistent joins, derived tables, and views. In addition, MariaDB gives you additional control over how the optimizer makes decisions, exposing more internal instrumentation and configuration as server variables you can set.


1  2  3  Next Page 

Sign up for CIO Asia eNewsletters.