I am runnig v95.
I have a query "select * from A, B where B.b<2000"
I create a MQT as "select * from A,B where B.b<2000" (identitcal to
the query), and the optimizer will use this MQT to answer this query.
However, if I submit the query using paramter marker "select * from
A, B where B.b<?", and later fill in this paramter using value
"2000", the optimizer will never use this MQT to answer the query.
Is there a way to let db2 use this MQT still?
thanks a lot!
p.s. I already tried the follwing, but doesn't work for me.
db2set DB2_SQLROUTINE_PREPOPTS="EXPLAIN ALL EXPLSNAP ALL REOPT 3"
db2 bind "@db2ubind.lst" blocking all sqlerror continue messages
bind.msg grant public REOPT ALWAYS
db2 bind "@db2cli.lst" blocking all sqlerror continue messages cli.msg
grant public REOPT ALWAYS