Index x MOD x Index based on functions
Up to DB2Index x MOD x Index based on functions
Posted by Breno Santos Araújo at March 24. 2011I need to select the registers that ends with 1
Example:
Select number from Table where MOD(number, 10) = 1
Supose I have an index for number's column.
When I use the MOD function the database does not use the index so I changed to
SELECT number from table where (number - (number/10) * 10) = 1
That is the MOD formula.
For the same reason the database does not use the index.
I looked on net and found that on Db2 ZOS is possible to use index based on functions.
Is this possible to DB2 9.7 Linux?
Thanks
Powered by
Ploneboard