Provides for the SQL99 expected behavior of
yields the same result as
Granted this is brute force and not very elegant, however it does provide the correct behavior. Optimally it would be nice to do a comparison on the values after between and then sort the two limiters and do a single rewrite leaving only one pass or scan.
In other words in pseudo SQL:
select * from foo where fo_num between a and b
becomes
select * from foo where ((fo_num >= min_value(a, b)) and (fo_num <= max_value(a,b))
This would yield only two comparisons or resolutions and then a single sequential or index scan to find the correct tuples.
This was done against beta1... --
- Thomas Swan
- Network Administrator
- Graduate Student - Computer Science
-
- The Institute for Continuing Studies
- The University of Mississippi
-
- http://www.ics.olemiss.edu
- http://www.olemiss.edu