Working with Explain results
Use the following procedure to specify Explain results options on the Explain Results panel.
Explain Results panel
Command ===> Scroll ===> CSR
More: >
Actions: S H K R RS RW RI XD XS XP W P T C D U IM SA
LBL STMTNO COST*RATE SQL-STATEMENT S.U.*RATE CAT REASON
XD01 0 48.064346 SELECT * FROM SYSTABLES WHERE LOCATION = ' ' AND NAME LIKE 'DSN%' 119 A ACCELMO
SELECT *
FROM SYSTABLES
WHERE LOCATION = ' '
AND NAME LIKE 'DSN%'
QB LEFT-HAND TYPE RIGHT-HAND STG1 MISMATCH JOIN KEY FILTER ORD# STAGE PD NG AP OR TEXT
1 LOCATION EQUAL VALUE Y N N 0.166667 2 STAGE1 N U "SYSIBM"."SYSTABLE
1 NAME LIKE VALUE Y N N 0.000329 1 SCREENING N U "SYSIBM"."SYSTABLE
COST*RATE QB PL MIX QTYPE METH ACC MTCH IX TBNAME IXNAME NU J O G CU J O G LCK PRE CFE ADEG JDEG APG JPG SCPG SNPG PAR MERGE
XD01 48.064346 1 1 0 SELECT 0 I 0 N SYSTABLES DSNDTX01 N N N N N N N N IS D
*********************************************************** ***************** Bottom of Data *********************************************************** *********
To specify Explain results
On the Explain Results panel, specify the action that you want to perform and press Enter:
If you want to do this
Perform this action
Collapse the results of that previous action code
Type H or the previous action code in the space beside an object.
Display a formatted version of the statement text
Type S in the space beside a statement.
Display the predicate report for the statement
Type P in the space beside a statement.
Display severe, warning, and informational path rules
Type R in the access path area.
For the query block line, these rules are based on Db2 PLAN_TABLE information. On the table line, these rules are based on the table and index statistics.
Display table and index statistics for the referenced objects in the Explain
Type S in the access path area.
All indexes for the table are shown. The referenced index appears first and is highlighted.
Display column statistics
Type S on a table in the access path area.
Display key columns
Type S on an index in the access path area.
The referenced key columns are displayed in white.
Display severe, warning, and informational rules, based on the table and index statistics
Type R on a table in the access path area.
Perform a What-If Edit SQL Explain
Type W on a statement.
Depending on the type of statement you choose, one of the following events occurs:
- XD, XP or XS opens an edit session for the SQL text as it currently appears in the catalog.
- W opens an edit session for the SQL text as it appeared in the selected statement.
Display SYSCOLDIST statistics
Type S on the first key column of an index.
Display SYSKEYTGTDIST statistics
Type K on the first key column of an extended key index.
- Repeat the preceding step until you have finished examining the Explain results.
Related topic