Mysql – Do MySQL optimizations hold for MariaDB also

mariadbMySQLoptimizationperformance

I am a developer who will be starting a new project soon in which database performance will be crucial. The current candidate for the backend is MariaDB. I have worked with MySQL and MariaDB before in smaller projects, but the field of bloody optimization is quite new to me, admittedly.

To prepare for the project and not drive it into the ground, I'd like to learn about database performance optimization first. I'd like to know if I (or my employer) bought a book about optimizing MySQL performance, would it apply to MariaDB similarly?

My intuition tells me, that most of the MySQL optimizations would apply to MariaDB too, for they change quite a huge portion of their code base, but to avoid wasting money by buying books which we don't need, I'd like to clarify this. Vice versa a book only applicable to MariaDB would be useless to us if we tried optimizing old products. Unfortunately – as far as I know – there are no books dedicated to MariaDB performance yet. Does this hold?

Best Answer

Yes, all the basic optimizations in MySQL 5.5 apply to MariaDB 5.5.

However, starting with MariaDB 10, a real fork, not all improvements in 5.6 are in MariaDB codebase, and alternatively, MariaDB has some exclusive features (Hash JOINS). For now, those are not too different, that may change in the future. For a book, where most of the optimizations are regarding basic indexing, it may not be very relevant.

And you can always check the latest improvements online -blogs, wikis. This is a presentation I created for the newest MySQL 5.6 query optimizations techniques.

Have a look at this image for a visual representation (white zones are MariaDB-only). 5.6- and 5.7-only are not represented:

enter image description here