Personal tools
You are here: Home Forums DB2 Index x MOD x Index based on functions
Navigation
Log in


Forgot your password?
 
Document Actions

Index x MOD x Index based on functions

Up to DB2

Index x MOD x Index based on functions

Posted by Breno Santos Araújo at March 24. 2011

I 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
Security Awareness
Would you like your company to implement gamification into your security awareness program?





Polls