附件:
cognos.sql (226.03 KB)
exfmt_europ.log (299.23 KB)
exfmt_europ.log (299.23 KB)
exfmt_japan.log (262.23 KB)
explain.log (271.12 KB)
Specify either REOPT keyword or CurrentPackageSet keyword in the db2cli.ini file. REOPT = 2 | 3 | 4 2---REOPT NONE (default value) 3---REOPT ONCE 4---REOPT ALWAYS CurrentPackageSet="NULLID" | "NULLIDR1" | "NULLIDRA" Setting REOPT = 4 is equvelent to CurrentPackageSet = "NULLIDRA". If both REOPT and CurrentPackageSet keywords are specified, CurrentPackageSet takes precedence.设置好了之后,断开重新连一下以确保设置生效。收起
( IOT_SHORT_NM = 'Japan' and IMT_SHORT_NM = 'Japan') or ( IOT_SHORT_NM = 'Japan' and IMT_SHORT_NM is null ) runstats on table DWDM.T_GEO_DIM on columns (( IOT_SHORT_NM, IMT_SHORT_NM )) with distribution on all columns and detailed indexes all2、创建一个statistical view 看看能不能修正一下card的估计值。
create view V_GEO_DIM as select * from T_GEO_DIM where IOT_SHORT_NM = 'Japan' and ( IMT_SHORT_NM IS NULL OR IMT_SHORT_NM = 'Japan') alter view V_GEO_DIM enable query optimization; runstats on table V_GEO_DIM on all columns with distribution;收起