Working with Explain results
-------------------------------------------------------------------------------
PSSPE200 Explain Results for PACKAGE DEMOCOLT.DEMOPKG1.V1.02
Command ===> Scroll ===> CSR
More: >
Actions: S H R RS RW RI XD XS XP W P T
LBL STMTNO COST*RATE SQL-STATEMENT
__ XD01 228 20.621376 DECLARE DEMOCUR1 CURSOR WITH HOLD FOR SELECT SN ,
LEFT-HAND TYPE RIGHT-HAND STG1 MISMATCH JOIN KEY FI
SN EQUAL NONCOLEXP N N N 0.04
PN EQUAL NONCOLEXP N N N 0.04
JN EQUAL VALUE N Y N N 0.04
COST*RATE QB PL MIX QTYPE METH ACC MTCH IX TBNAME IXNAME
__ XD01 20.621376 1 1 0 SELECT 0 I 0 N SPJ SPJNX01
******************************** 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.
- Repeat Step 1 until you have finished examining the Explain results.