Use range instead of ref when we know that range is equal or better.
This stabilizes main.order_by_optimizer_innodb, where the result varies depending on the rec_per_key status from the engine. The logic to prefer range over a const ref: - If range of has only one part and it uses more key parts than ref, then use the range. Example: WHERE key_part1=1 and key_part2 > # Here we will prefer a range over (key_part1,key_part2) instead a ref over key_part1.
Showing
Please register or sign in to comment