Skip to content

Commit 3816db2

Browse files
MDEV-32732 Support DESC indexes in loose scan optimization
Extend loose index scan to support descending indexes. This is achieved by removing a block skipping creating loose index scan plan for descending index, as well as generalising the execution of such plans. The generalisation applies to all levels looking for min/max in loose index scan. In the highest level (get_next), generalise min and max to first and last, so that it still proceeds in the direction agreeing with the index parity. In the lower levels, combine next_min and next_max methods into next_min_max, and combine next_min_in_range and next_max_in_range into next_min_max_in_range. This retains existing logic of these functions and reduces code duplication, while allowing handling of all four combinations (min, max) x (asc index, desc index).
1 parent 689bed1 commit 3816db2

File tree

6 files changed

+884
-290
lines changed

6 files changed

+884
-290
lines changed

0 commit comments

Comments
 (0)