You can generate a diagram of the current access plan for a query
to find out how DB2® access
data to process a query. This information is the same information that is
in PLAN_TABLE, but it is presented in an easy-to-read, visual format.
Prerequisite: Before you can create
an access plan graph:
- The subsystem must be configured for tuning.
- You must have authorization to issue the EXPLAIN statement for the query.
Also, consider specifying EXPLAIN options and environment parameters.
To graph the access plan for a query:
- If the Query page is open, select one of the following options
in the EXPLAIN options menu:
- Use local EXPLAIN information
- Specifies use of the EXPLAIN information that is cached on your local
machine. This option is available only when the EXPLAIN timestamp field
has a value, which means that the EXPLAIN information for this query exists
in your local cache. If this information exists but is not up to date, consider
selecting one of the other two options.
- Use subsystem EXPLAIN information
- Specifies to collect existing EXPLAIN information for this query from
the EXPLAIN tables on the selected subsystem. If this information exists but
is not up to date, consider selecting the Run EXPLAIN again option.
- Run EXPLAIN again
- Specifies to issue the EXPLAIN statement for the specified query and collect
the resulting information from the EXPLAIN tables on the DB2 for z/OS® subsystem.
- Click . If the View Queries page is open, select . The access plan graph is displayed.