Explain COST: (MS) and COST: (SU) values displayed as N/A when PLAN_TABLE and DSN_STATEMENT_TABLE auto created
search cancel

Explain COST: (MS) and COST: (SU) values displayed as N/A when PLAN_TABLE and DSN_STATEMENT_TABLE auto created

book

Article ID: 123472

calendar_today

Updated On:

Products

Plan Analyzer for DB2 for z/OS

Issue/Introduction

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?

Cause

This problem is caused by the missing column FUNCTION_LVL within an auto-created DSN_STATEMNT_TABLE. 

Resolution

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.