MDEV-9457: Poor query plan chosen for ORDER BY query by a recent 10.1
Undo the change in test_if_skip_sort_order() that set ref_key=-1 when a variant of index_merge is used (was made in fix for MDEV-9021). It turned out that test_if_cheaper_ordering() call below assumes that ref_key=-1 means "no index is used", that is, "an inefficient full table scan is done". This is not the same as index_merge, index_merge can actually be quite efficient. So, ref_key=MAX_KEY denotes the fact that some index is used, not any given index.
Showing
Please register or sign in to comment