Default language.

Working with Explain results


Use the following procedure to specify Explain results options on the Explain Results panel.


  FILE   COMMANDS   OPTIONS   HELP
-------------------------------------------------------------------------------
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 *******************************
Warning

Important

For a SQL Performance for DB2 installation, the identifier of this panel is PSSPW200. Also, additional action codes are available only as part of the SQL Performance for DB2 solution.

Success

Tip

  • If the Explain results panel information is truncated, place your cursor on the field, and press F4 or F6 ( ZOOM). The contents of the entire field are displayed in a pop-up window.
  • To find a specific string of text, type FIND string on the COMMAND line, and press Enter. Press F5 to move the cursor to a subsequent instance of the specified text.

To specify Explain results

  1.  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.
  2. Repeat Step 1 until you have finished examining the Explain results.


 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*

BMC AMI Ops Monitor for Db2 13.1