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: Joining many tables in MySQL - optimizer_search_depth
… the performance in case of particular queries but surely cannot be an all-around answer to inefficiencies of the optimizer, that should be doing a good job in the first place. In addition, hints need to be… (application’s) logic which is simply a nightmare for developers in case of migration or major change…
Post: Load management Techniques for MySQL
… configuration, queries and hardware, even though fixing these does help in many cases. Whatever powerful and well tuned system you have…. Introduce Throttling Sometimes even single process overloads system too much in this case throttling by having relatively short queries and introducing…
Post: Join Optimizations in MySQL 5.6 and MariaDB 5.5
… optimizer enhancements in MySQL 5.6 and MariaDB 5.5. This blog post is targeted at the join related optimizations introduced in the optimizer. These optimizations are available in both MySQL 5.6 and MariaDB 5… Scan for BKA here. Now there is one additional join optimization in MariaDB that I would like to quickly explain here, and…
Post: Multi Range Read (MRR) in MySQL 5.6 and MariaDB 5.5
… disks in Software RAID5. Also note that the following changes were made in the MySQL config: optimizer_switch=’index_condition_pushdown=off’ optimizer_switch=’mrr=on’ optimizer_switch=’mrr_sort_keys…
Post: Index Condition Pushdown in MySQL 5.6 and MariaDB 5.5 and its performance impact
I have been 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…
Post: Joining many tables in MySQL - optimizer_search_depth
… 5 seconds even though in the read less than 1000 rows and doing it completely in memory. The plan optimizer picked was very… making it unusable to check the optimizer performance. Solution for this problem was to use set optimizer_search_depth=0, rarely used… backward compatibility. In MySQL 5.6 things are likely to get even better handling joins of many tables as optimizer heuristics are…
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 want… 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… huge and 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…
Post: MariaDB 5.3 is released as GA!
… them look very good indeed. Peter will present the results in an “optimizer standoff” talk at the upcoming MySQL conference, and Timour… Dynamic columns and virtual columns (they’re different) offer flexibility in schemas Microsecond time resolution for DATETIME and similar time-based… offers microsecond timestamp support, as well as a lot of optimizer improvements. Even the standard MySQL 5.5 offers pluggable authentication…

