SQL Analysis Summary
The SQL Analysis Summary screen provides a quick reference of your SQL statements and enables you to easily identify the SQL you want to analyze. It displays the Db2 cost threshold, enabling you to identify SQL requiring performance improvements. It also displays the processing service units, thereby minimizing the need to print the Cost Detail Report. (The Cost Detail Report, requested as part of Explain Detail, has many output lines.) From this screen, you can select a DBRM/Package for more analysis.
The screen displays when you request an online explain by entering the X line command on the screens listed below. It is not displayed if there is only one SQL statement.
- SQL Plan Selection screen (SQL Plan Selection).
- DBRM Selection screen (DBRM Selection Screen).
- Collection ID Selection screen (Collection ID Selection Screen).
- Package Selection screen (Package Selection Screen).
- DBRM/Package Selection screen (DBRM/Package Selection Screen).
This screen is also displayed when you request an online report from the SQL Explain Report Specification screen (SQL Explain Report Specification Screen).
SQL Analysis Summary
CMD
Enter S to select a SQL statement for more analysis. The Plan Table Analysis screen (Plan Table Analysis Screen) displays.
DBRM/Package
Name of the DBRM/Package for the plan.
Statement
Statement number within the plan or package.
Type
Type of SQL statement.
DB2 Cost
If the cost exceeds the threshold for the plan, an asterisk (*) displays next to this field. The value of the DB2 cost threshold is determined at the time File-AID for Db2 is installed.
PROCSU
The estimated processor cost, in service units, for the SQL statement. The estimate is rounded up to the next integer value. If a DSN_STATEMENT_TABLE is not defined, then the PROCSU field displays N/A.
The maximum value for this cost is 2147483647 service units. If the estimated value exceeds this maximum, then the maximum value is reported.
Access Type
Access type.
Sorting DBRM/Package Entries
The SORT primary command can be used to change the order in which the DBRM/Package entries are displayed. Multiple column names are not accepted. The selected columns are sorted in ascending sequence. The valid column names that can be used with the SORT command are listed below. Abbreviations are noted within parentheses.
- DBRM/Package (DBRM)
- Statement (ST)
- Type (TYPE)
- DB2 Cost (COST)
- Access Type (AC)
- PROCSU (PR)
For example, to sort the display by statement, enter the command SORT ST.