Well
!db2 explain plan set queryno = 20 for 'SELECt count(*) from lineitem'
on an frehs TPCH database works, after using this create table statement:
create table turnover_mat as (
select rc_name, rs_name, p_type, SUM(l_extendedprice*(1-l_discount)) as turnover, count(*) as counti
from lineitem_full
group by rc_name, rs_name, p_type)
data initially deferred
refresh immediate
enable query optimization
maintained by system;
refresh table TURNOVER_MAT;
"
!db2 explain plan set queryno = 20 for 'SELECt count(*) from lineitem'
fails with the error given above. Dropping the set queryno:
!db2 explain plan for 'SELECt count(*) from lineitem'
it works fine.
this set queryno error always appears if a query would use this MQT