Using section explain information
Starting from DB2 9.7 Fix Pack 1, DB2 introduced the section explain functionality that allows us to capture explain information using the contents of a run-time section. Using section explains, we can get information about the actual execution values along with the estimated values provided by the EXPLAIN
command. In this recipe, we will discuss how we can extract explain information from a section, and compare the estimated and actual values in the access plan.
Getting ready
We should have EXPLAIN
tables created before we can capture any explain information.
How to do it...
To obtain the estimated and actual explain information, perform the following steps:
1. Enable section actuals: Update the
SECTION_ACTUALS
database manager configuration parameter value toBASE
.UPDATE DATABASE CONFIGURATION USING SECTION_ACTUALS BASE
2. Create a workload to collect the activities submitted by the target application, and enable section data collection for these activities...