Describing Db2 packages
(SPE2005)
Use the Describe views to display details about all statements in a Db2 package. The Describe views display the following information:
- Statement number for all statements
- Statement text for all statements
- Message severity for explainable statements
- If you bound the package with Explain set to YES or ONLY:
- Explain cost
- Explain timestamp
- Explain plan translation
You can also start an SQL Tuning session for a statement in the package.
To describe Db2 packages
- Select the DB2 Navigator perspective.
- Open or create an object view for packages.
Select up to five objects from the packages list and click Describe
.
Alternatively, you can right-click the selected objects and select Describe.
The Describe summary view is displayed in the Performance perspective.
Legend
#
Description
Details
1
View report
Displays the Describe output in a Report dialog box
To save the output to disk, in the Report dialog, click Save output text
.
2
Statement details
Displays the following information for each statement:
- Package name
- Statement number
- Statement text
- Cost
- Explain (YES) details
- Explain (ONLY) details
3
Sort options
Select how to sort the statements from the following options:
- Default sort
- Sort by Cost
- Sort by Severity
4
Performance perspective options
Displays the Performance perspective options. For more information, see Setting-SQL-tuning-options.
5
Message severity indicator
Indicates the highest severity of the message rules associated with the statement (if a message rule exists)
Icon
Description
Severe
Warning
Information
6
Details
Displays the statement in the Describe details view
7
Describe status
Displays the status of statement processing for the packages that you selected
- Select one of the following sort options:
- Default order
- Sort by Cost
- Sort by Severity
- (Optional) To view the messages for the statement, click the message severity icon.
Click Details on the statement that you want to inspect.
The Describe details pane is displayed that includes the complete statement, cost, and explain data.
Legend#
Description
Details
1
Back
Displays the Describe summary view
2
Statement details
Displays the following information:
- Package name
- Statement number
- Statement text
- Cost
- Explain (YES) details
- Explain (ONLY) details
3
Performance perspective options
Displays the Performance perspective options. For more information, see Setting-SQL-tuning-options.
4
Message severity indicator
Indicates the highest severity of the message rules associated with the statement (if a message rule exists)
Icon
Description
Severe
Warning
Information
5
Explain
Opens an SQL Tuning Session for the statement. For more information, see Performance-perspective.
6
Describe status
Displays the status of statement processing for the packages that you selected.
- (Optional) To open an SQL Tuning Session, click Explain.
For more information, see Performance-perspective.