|previous : next|
This is experimental functionality, and as such subject to change. Use at your own risk!
Applies to ✅ Open Source Edition ✅ Express Edition ✅ Professional Edition ✅ Enterprise Edition
Some arithmetic comparisons can be reorganised such that single column expressions are on one side of an equation, and thus benefit index usage more. While function based indexes could help work around the issue, it's usually better to rely on ordinary indexes, which are more generally reusable.
Using Settings.transformPatternsArithmeticComparisons, the following transformations can be achieved:
-- With Settings.transformPatternsArithmeticComparisons active, this: SELECT * FROM tab WHERE c + 1 = 3; -- ... is transformed into the equivalent expression: SELECT * FROM tab WHERE c = 3 - 1;