Limited supportBMC provides limited support for this version of the product. As a result, BMC no longer accepts comments in this space. If you encounter problems with the product version or the space, contact BMC Support.BMC recommends upgrading to the latest version of the product. To see documentation for that version, see BMC AMI Apptune for Db2 13.1.

Working with Explain results


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

PSSPW200                                              Explain Results for SQLTEXT                                                                             
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 *********************************************************** *********


Note

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


Tip

Some content is unavailable due to permissions.

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.

    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.

  2. Repeat the preceding step until you have finished examining the Explain results.

 

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