If you are using InfoSphere® Optim™ Query Tuner for DB2® for z/OS® or InfoSphere Optim Query Workload Tuner for DB2 for z/OS,
you can generate reports that show statistics for tables that an SQL
statement references, details about predicates in the statement, and
statistics for the indexes that the access plan uses.
Procedure
To generate access path reports for an SQL statement:
- Capture the SQL statement that you want to tune. See Locations
from which you can capture an SQL statement for single-query tuning.
- Select one of the captured statements
and click the Invoke Advisors and Tools button.
The Run Single-Query Advisors and Analysis Tools page
in the Invoke section opens.
- If you need to set the schema to use for unqualified objects
that the SQL statement references, or (if the statement runs on DB2 for z/OS) change the SQL ID, specify these values
in the Schema and SQLID fields above the SQL statement on this page.
For information about setting global defaults for schemas and SQL
IDs, see Setting the schema to use for unqualified objects,
the SQL ID, or both.
- Click the Select What
to Run button.
- In the Select Activities window, select
the Report statistics from access plan option.
Then, click OK.
- When the Generate Access Path Reports window
appears, choose which reports to generate and the format in which
to generate them. Then, click OK.
Results
The reports are displayed in the
Review Access Path
Reports page of the
Review section.
If this page does not open automatically because you selected additional
options in the
Select Activities window, click
Open
Access Path Reports under
Single Query on
the left side of the
Review section.