The MariaDB Foundation values our partnerships with our sponsors. Our partnership with IONOS allows us to get insight into how MariaDB Server is used and the direction it should take. As well as generally improving MariaDB Server in many different ways.
At CloudFest 2023, one of the first meetings we had was with Stefan Erkeling from IONOS. It was a very good meeting and it was great to see how much IONOS values our partnership. Stefan indicated in the meeting that there was a performance issue they were hitting and some advice was needed.
Yes, it is a bit of a click-bait title, but in this case running one SQL command did improve a community user’s performance by that much. It could help you too.
A community user posted in a couple of places that when migrating a large WordPress installation to MariaDB that they were seeing a certain query performing terribly. The query was taking 1.5 seconds to execute and it was clear from the explain plan that the optimizer was not making an ideal decision about the join order.
The query was generated by WordPress so it would not be easy to force an index, or rewrite the query.
Posted recently on the maria-developers mailing list, by Igor Babaev, Principal MariaDB developer at Monty Program is some interesting preliminary results for MariaDB 5.3.0 benchmarked against the DBT-3 benchmarking program.
DBT-3 is a benchmark to test a decision support workload, with a suite of business-oriented queries and concurrent data modifications.
Read Igor’s discoveries, which he ran on a laptop with 4 cores (multi-threaded = 8 cores in total), 8GB RAM and SSD on SuSE, and as Igor says, enjoy his numbers. It is a repeatable benchmark with all settings included.
In our upcoming MariaDB 5.3 release Monty optimized the internal string append code for performance. I tested his patch with a plain MariaDB 5.2 vs. a patched MariaDB 5.2 with sql-bench, which showed an overall performance gain around 3%.
The details of the patch Monty describes like this
Patch to optimize string append:
While examining a trace output from a mysql-test-run case, I noticed a
lot of reallocation calls. This was strange as MariaDB/MySQL was
designed to do so few malloc/realloc as possible. The system uses was
to first calculate how big buffer you would need and then allocate a
buffer big enough for most usage. …