1)SELECT numeric_number FROM table_math WHERE numeric_number + 0 = ?
Nevertheless we can index these expressions with a function-based index if we use calculations in a smart way and transform the
whereclause like an equation:
2)SELECT a, b FROM table_math WHERE 3*a - b = -5
In both cases though index is there on a and b,it won't use that index,If you are frequently using these of mathematical expression better to create an index as follows i.e function based index
We just moved the table references to the one side and the constants to the other. We can then create a function-based index for the left hand side of the equation:
CREATE INDEX math ON table_math (3*a - b)