Comments - Configuring MariaDB for Optimal Performance
Content reproduced on this site is the property of its respective owners,
and this content is not reviewed in advance by MariaDB. The views, information and opinions
expressed by this content do not necessarily represent those of MariaDB or any other party.
Make sure you set the optimizer search depth in your my.cnf file if many of your queries have a large number of tables:
https://mariadb.com/resources/blog/setting-optimizer-search-depth-mysql
A 28 table query with some subqueries was taking about 20 seconds to complete with the default
optimizer_search_depth
value of 62.After setting
optimizer_search_depth = 0
(auto) the same query took 0.03 seconds.