Executed a Plan Analyzer for Db2 for z/OS (PPA) Future Explain job.
Though a PLAN_TABLE and DSN_STATEMNT_TABLE were created automatically, the values for
the "COST: (MS)" and "COST: (SU) were displayed as N/A in the "ACCESS PATH ANALYSIS" report.
In the job log, the following messages were displayed in.
-- creator.PLAN_TABLE TABLE WAS AUTO-CREATED AND FORMAT IS V12.
-- creator.PLAN_TABLE_HINT_IX INDEX WAS AUTO-CREATED.
-- creator.DSN_STATEMNT_TABLE TABLE WAS AUTO-CREATED AND FORMAT IS V12.
-- creator.DSN_STMT_TABLE_IX INDEX WAS AUTO-CREATED.
-- creator.DSN_PREDICAT_TABLE TABLE WAS AUTO-CREATED AND FORMAT IS V12. .......
.......(Omitted...)
In the "ACCESS PATH ANALYSIS" report, the following were displayed.
ACCESS PATH ANALYSIS:
COST: (MS) N/A (SU) N/A (TC) +.60730 E+01
...(Omitted...)
On the other hand, if executing the same Future Explain job after creating a PLAN_TABLE and a DSN_STATEMNT_TABLE,
it seemed that the values for the "COST: (MS)" and "COST: (SU) was displayed in the "ACCESS PATH ANALYSIS" report.
In the job log, the following messages were displayed in.
-- creator.PLAN_TABLE EXIST AND THE EXPLAIN TABLE FORMAT IS V12.
-- creator.DSN_STATEMNT_TABLE EXIST AND THE EXPLAIN TABLE FORMAT IS V12.
-- creator.DSN_PREDICAT_TABLE EXIST AND THE EXPLAIN TABLE FORMAT IS V12.
-- creator.DSN_FILTER_TABLE EXIST AND THE EXPLAIN TABLE FORMAT IS V12.
-- creator.DSN_STMT_TABLE_IX INDEX WAS AUTO-CREATED.
-- creator.DSN_PREDICAT_TABLE_IDX3 INDEX WAS AUTO-CREATED.
-- creator.DSN_FILTER_TABLE_IDX2 INDEX WAS AUTO-CREATED.
In the "ACCESS PATH ANALYSIS" report, the following were displayed.
ACCESS PATH ANALYSIS:
COST: (MS) 1 (SU) 11 (TC) +.60730 E+01
Why are the values for the "COST: (MS)" and "COST: (SU) displayed as N/A in the case of the PLAN_TABLE and DSN_STATEMNT_TABLE are auto-created?
This problem is caused by the missing column FUNCTION_LVL within an auto-created DSN_STATEMNT_TABLE.
This problem can be avoided by the workaround. After a DSN_STATEMNT_TABLE is manual-created, please run a EXPLAIN job.
For r19.0, PTF SO06752 solves this problem.
For r20.0, PTF SO04462 solves this problem.