Hi Sjoerd,
This is very welcome!
If I read well, this will use, in order of preference:
1. binary search (if l is sorted)
2. imprints if available
3. nested loop otherwise
We use rangejoin extensively within Spinque and the previous one (just nested loop) has never an option.
So far we have been using our own version which is perhaps naive but proved to be effective:
- sort all inputs if not sorted already
- perform a mergejon-like fast scan
Though simple, I have not found so far a case where this strategy would not outperform nested loops by far. The cost of sorting was always far less than the cost of a full nested loop.
I was wondering what your thoughts about this would be. Could this strategy replace the number 3 above? Does it make sense to keep the vanilla nested loop?
Best, Roberto