Currently when we call prev() with an upper_bound, we call a search_near() to position the cursor to the nearest visible record. This implementation is not optimised through the edge case where we have no visible record previous to the upper bound and there are no visible records after the upper bound. In this case search_near_neighbouring does a next loop() til it goes out of bounds, thus "walking til the end of the key range". Afterwards we start from the end of the tree and walk backwards to find the visible record before the search key, note we don't search near here because we have a BOUND_ENTRY_FLAG set. This means we will be walking from the end of the tree instead of starting from the end of the key range. This performance optimisation can be improved.
Acceptance Criteria (Definition of Done)
This ticket will be marked as done, once the performance is improved and search only traverses in between key ranges.