Category: CommunityMariaDB vs. MySQL: What’s The Difference?

Share this post...Tweet about this on TwitterShare on Google+0Share on Facebook0
InterWorx does not currently support MariaDB, but it’s an interesting prospect. What do you think? Let us know in the comments or the forums!
MySQL vs MariaDB

Photo Credits: Nemo

For many years, MySQL was the leader of the pack when it came to open source relational databases. In recent years, however, the MySQL fork, MariaDB, has been making significant headway and some big sites – including Wikipedia – have made or are in the process of making the switch.

MySQL was created by the Finnish developer Michael “Monty” Widenius and David Axmark and released under the GPL and various commercial licenses. The database was originally developed under the auspices of MySQL, AB but in 2008 that company was sold to Sun Microsystems, which was itself acquired by Oracle Corporation, the developers of a popular and closed source competitor to MySQL.

MySQL is by far the most popular open source relational database platform. After being dissatisfied with the way development was heading under Sun, however, Widenius forked MySQL and created MariaDB. The purchase by Oracle further cemented the impression that MySQL was not in safe hands because of a perceived conflict of interest between MySQL and Oracle’s commercial database products.

MariaDB was intended as a drop-in, fully compatible replacement for MySQL, with each version of MariaDB implementing all of the features of its equivalent MySQL version. However, because patches and new features have been incorporated into MariaDB more quickly than MySQL, as things stand, MariaDB has made some significant performance and feature advances. In versions before the 10.x release, users could be certain that everything MySQL did, equivalent versions of MariaDB did too, but that reverse was not always true. In the future, MariaDB is likely to diverge more rapidly from MySQL.

Features that were implemented in MariaDB, but not MySQL, included:

  • The Aria Storage engine, which enabled faster complex queries.

  • Virtual columns, which allow for on-the-fly calculation and updating of columns.

  • Table elimination for removing unnecessary table access for queries that reference a table but don’t require it to be accessed.

  • Various other performance optimizations.

The other significant difference between the two is that MySQL is susceptible to the whims of Oracle, while MariaDB is a community-managed project overseen by Widenius.

A number of large sites have changed to MariaDB from MySQL or are in the process of doing so, including Wikipedia. Wikimedia Site Architect, Asher Feldman, said of the change:

“Taking the times of 100% of all queries over regular sample windows, the average query time across all enwiki slave queries is about 8% faster with MariaDB vs. our production build of 5.1-fb. Some queries types are 10-15% faster, some are 3% slower, and nothing looks aberrant beyond those bounds. Overall throughput as measured by qps queries per second has generally been improved by 2-10%. “

Of course, the performance increases depend heavily on how the database is used, so your mileage may vary considerably.

Ultimately, making the decision to switch should be based on whether the performance and feature enhancements are worth the effort of the change (which isn’t difficult to do), and whether the licensing issues are a problem. Users of Oracle’s support services have no choice, as Oracle doesn’t support MariaDB, but otherwise a simple cost / benefit analysis and consideration of the likely future development of the two platforms probably favors MariaDB.

Have you or are you thinking about making the switch? If so, why? Join the conversation in the comments below.

May 30, 2013, 5:13 pmBy: InterWorx (7) Comments
  1. K. Arrows: MariaDB significantly improved magento loading times for me on a store with 60k products.
    February 10, 2017 at 2:55 pm
  2. Jim Burnett: Sharon is right. We simply can not rely on Oracle to do what is right here. They are commercial and have a commercial mindset. Safe bet is to start using PostgreSQL. 
    June 10, 2013 at 3:54 pm
  3. cloudrck: MariaDB is a drop in replacement, and it out performs MySQL. Plus with the route MySQL is going, I think it's time to move away from MySQL.
    June 1, 2013 at 10:24 pm
    • CloudHopping: When chatting yesterday about us possibly migrating over - we were told that MariaDB as well as Percona were not officially supported. I find it surprising that companies have not decided to migrate as of yet. Truth to be told - from a marketing perspective - I suggest InterWorx be the first. For all practical purposes, MariaDB is a binary drop in replacement of the same MySQL version - therefore it should be an easy switch (and/or easy enough to give end users the ability to choose) Maria DB has more storage engines than MySQL however since most are not using the Aria storage engine simply assign the default memory for that storage engine in my.cnf to be very low and watch the ram usage drop. Of greater concern however is that the Free-and-open MySQL competes with Oracle’s proprietary and extremely competitive tools. Since Oracle is now the "owner" of MySQL - That alone is grounds for concern—will Oracle do something to impede MySQL’s development? While they have made strides in their INNODB scalability recently only time will tell.
      June 6, 2013 at 12:03 pm
    • interworx: Are you currently using MariaDB? Any specific performance gains you can share?
      June 3, 2013 at 10:14 am
  4. Marc P: I'm still waiting on MySQL to come up with a super-simple easy way to replicate a database without doing all kinds of crazy stuff.
    June 1, 2013 at 6:50 pm
  5. Sharon Gaughan: I have been thinking a lot about this and agree with your stated reasons why MariaDB may be preferred over MySQL. However, I can add an additional hybrid reason which, if true, may indicate that MySQL is on a downward spiral and risk obsolescence. Imho, we can't trust Oracle and MariaDB is well-positioned to take over MySQL's space. After all, MySQL should have made the "improvements" long ago, obviating the need for MariaDB to do so. This pattern can only accelerate from here on in.
    June 1, 2013 at 11:56 am

Leave a Reply
Surround code blocks with <pre>code</pre>

Your email address will not be published.


Sign up to receive periodic InterWorx news, updates and promos!

New Comments

Current Poll

  • This field is for validation purposes and should be left unchanged.