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.

MariaDB has also incorporated a kernel enhancement that removes mutexes that were terrible for performance. A mutex is a type of lock that serializes access to resources in the kernel. If the resource is currently held, a process must wait until it is available. An existing mutex built into the MySQL kernel slowed things down dramatically on modern hardware. Removing it helps MariaDB scale on the large SMP boxes that are becoming increasingly common these days.

Lastly, if you've wanted to move to row-based replication but been held back by the omission of SQL statements in row-based replication logs, MariaDB has addressed this too.

Row-based replication isn't generally readable because you're sending the raw data block, the before and after "image" of that data, not the SQL statement that was executed. The data block is delivered to the slave database and written directly to the file, no reexecution of SQL. For this reason, the SQL statement was left out of logging in MySQL.

In MariaDB, the SQL statements are logged to the binary logs for row-based replication just as they are for statement-based replication. Having that SQL statement can be very helpful for troubleshooting and in cases where you want to do point-in-time recovery. It's a much-needed addition.

Pushing the envelope
For those who want to push the envelope further, MariaDB has features that take you beyond the stock MySQL functionality.

For starters, you have two new high-performance storage engines to choose from: Aria and XtraDB. Although these are not drop-in compatible with existing MySQL deployments, you can rebuild a table to or from these engines with a simple ALTER command.

Next up you get access to a whole new clustering technology called Galera. This is completely different from NDB Cluster and its many known problems. Galera allows active-active multimaster updating, which does not work well with NDB Cluster because of the limitations on JOINs. Here you can really start to scale writes on cloud servers. What's more, you get access to parallel and synchronous replication features.

Want to get NoSQL speed? Consider the HandlerSocket plug-in, which enables direct access to storage engines without going through the optimizer, boosting velocity by 10 times or more. You can also now get a row of data returned in JSON format using dynamic columns in MariaDB -- not so in MySQL.

MariaDB includes yet another new storage engine, Cassandra SE, that allows you to read or write data into a Cassandra data store. Finally, integration between SQL and NoSQL made easy!

Want to consolidate data from multiple master databases? Multisource replication is exactly what you're looking for. Assuming your source data is stored in multiple schemas, they can all be brought together on one instance downstream -- again, not possible in MySQL.

 

Previous Page  1  2  3  Next Page 

Sign up for CIO Asia eNewsletters.