-
Jorgen Loland authored
"FORCE INDEX [FOR ORDER BY] (indexName)" did not work for joins because test_if_skip_sort_order() contains a heuristic that table scan + join cache tends to be cheaper than an index scan. While the heuristic may be correct, it should not override the users explicit request to use the index. This patch also changes the warning created for EXPLAIN. Instead of printing only "IGNORE/USE/FORCE INDEX" it now also prints "FOR [GROUP BY|ORDER BY|JOIN]" if this was specified in the query.
Jorgen Loland authored"FORCE INDEX [FOR ORDER BY] (indexName)" did not work for joins because test_if_skip_sort_order() contains a heuristic that table scan + join cache tends to be cheaper than an index scan. While the heuristic may be correct, it should not override the users explicit request to use the index. This patch also changes the warning created for EXPLAIN. Instead of printing only "IGNORE/USE/FORCE INDEX" it now also prints "FOR [GROUP BY|ORDER BY|JOIN]" if this was specified in the query.
Loading