You can find out whether rebinding a set of packages made
changes to access plans and whether those changes slow the execution
of SQL statements.
About this task
Use this procedure if you rebind packages regularly and want
to gain an understanding of the changes in access plans before and
after rebinding.
Procedure
To compare access plans for two different versions of
the same packages in one collection:
- Bind the packages that you plan to analyze, setting the EXPLAIN option
to YES.
- Bind a new version the same packages in the same collection,
setting the EXPLAIN option to YES.
- Create a comparable workload and run
the comparison. A comparable workload is a
workload that you create specifically for the comparison. It a logically
grouping of both the packages that are in the original collection
and the packages that are in the new collection.
- In the Data Source Explorer, connect to the DB2® for z/OS® subsystem on which the collections are
located.
- Right-click the connection and select .
- Click the Manage tab on the left
side of the workflow assistant to open the Manage section.
- On the Manage Workloads page, click
the Create Workload for Comparison icon, which
is at the top of the page and looks like this:

- Follow the steps in the Create Workload for
Comparing Access Plans in Packages wizard.
- On the Comparison History page,
select the comparison and click Review Results.
Results
The
View Comparison Results by Package Summary page
opens. Double-click listed packages to see the comparisons of individual
statements. Double-click statements to see the details of changes
to access plans. You can create PLAN_TABLE hints for individual statements,
or you can rebind individual packages with the SWITCH option, so that
SQL statements use earlier, better access plans.