Bartosz, You are right this is due to an optimizer inefficiency. But till the time the optimizer is not efficient enough we would have to use workarounds. In fact hints tend to be used a lot because although mostly optimizer makes good choices but sometimes it doesn’t.
Comment: Benchmarking single-row insert performance on Amazon EC2
…, I am not testing IO performance and instead trying to optimize writes, also the durability requirements are not that stringent and…
Comment: Joining many tables in MySQL - optimizer_search_depth
… cannot be an all-around answer to inefficiencies of the optimizer, that should be doing a good job in the first…
Post: Load management Techniques for MySQL
One of the very frequent cases with performance problems with MySQL is what they happen every so often or certain times. Investigating them we find out what the cause is some batch jobs, reports and other non response time critical activities are overloading the system causing user experience to …
Post: Join Optimizations in MySQL 5.6 and MariaDB 5.5
… config: optimizer_switch=’index_condition_pushdown=off’ optimizer_switch=’mrr=on’ optimizer_switch=’mrr_sort_keys=on’ optimizer_switch=’mrr_cost_based=off’ optimizer_switch=’join_cache_incremental=on’ optimizer_switch…
Post: Joining many tables in MySQL - optimizer_search_depth
… was taking same 5 seconds, which points to problem with optimizer performance. Note though if you have subqueries these might need… making it unusable to check the optimizer performance. Solution for this problem was to use set optimizer_search_depth=0, rarely used… chose best value automatically. Making this change I could bring optimization, and full query execution time to less than 50ms. Low…
Post: Multi Range Read (MRR) in MySQL 5.6 and MariaDB 5.5
… were made in the MySQL config: optimizer_switch=’index_condition_pushdown=off’ optimizer_switch=’mrr=on’ optimizer_switch=’mrr_sort_keys=on’ (only on MariaDB 5.5) optimizer_switch=’mrr_cost_based… another area of improvement in the optimizer, as it is clearly a part of the optimizer‘s job to select the best…
Post: Index Condition Pushdown in MySQL 5.6 and MariaDB 5.5 and its performance impact
… working with Peter in preparation for the talk comparing the optimizer enhancements in MySQL 5.6 and MariaDB 5.5. We are taking a look at and benchmarking optimizer enhancements one by one. So in the same way this blog post is aimed at a new optimizer enhancement Index Condition Pushdown (ICP). Its available in both MySQL…
Comment: Joining many tables in MySQL - optimizer_search_depth
…? At the time when I implemented the so-called “greedy optimizer“, I did some experiments to determine what is a reasonable… depth (and the total number of tables) that can be optimized in reasonable time. I reached the conclusion that if we… a conservative limit that guarantees that any query can be optimized quickly no matter how bad the pruning heuristics works. With…
Comment: Joining many tables in MySQL - optimizer_search_depth
… point of my blog post is what default value of optimizer_search_depth is impractical as 62! which is potential number… it needs to be lowered down significantly in the cases optimizer spends too much time choosing the plan. I’ve looked at playing with optimizer_prune_level variable which is another one available. The default…

