Explain processing
To complement workload analysis,
SQL Performance
includes an integrated, robust Explain function.
This Explain function enables you to dynamically Explain dynamic or static SQL statements. The Explain function provides both statistical and textual information about the access path along with suggestions on how to improve SQL statement performance. This Explain function also allows you to export an SQL statement to an ISPF edit session for modification and return it to the SQL Performance environment to be Explained.
You can issue an EXPLAIN command from any SQL statement reported on the SQL Statement Text report or by using the Explain Object Specification panel (PSSPA115).
The Explain Results panel displays Explain output. The output includes helpful information about improving the performance of the SQL statement. Use action codes to display the plan table summary, catalog statistics, and index key columns.
-------------------------------------------------------------------------------
PSSPW200 Explain Results for SQLTEXT
Command ===> Scroll ===> CSR
More: >
Actions: S H R RS RW RI XD XS XP W P T C D U IM SA
LBL STMTNO COST*RATE SQL-STATEMENT
C XD01 117 1012.256592 SELECT * FROM PXB.EMP WHERE LASTNAME = 'BAKER'
COST*RATE QB PL MIX QTYPE METH ACC MTCH IX TBNAME IXNAME NU J O G
XD01 1012.2565 1 1 0 SELECT 0 R 0 N EMP N N N N
******************************** Bottom of Data *******************************
You can also issue historical Explains (static Explains) and retrieve SQL text from the catalog from the SQL Statement Text report. Further, you can issue an EXPLAIN COMPARE on a static SQL statement from the SQL workload. This process performs a dynamic Explain and a static Explain, matching the STMTNO from the catalog to QUERYNO in the PLAN_TABLE.
For more information, view the Quick Course SQL Performance for DB2—Using the Explain Interface. |
For more information about Explain, see the
Related topic