When to use Explain reports

Use Explain reports if you suspect a problem with indexes or SQL statements.

You should be able to identify candidate plans or packages from the Accounting report. Generally, an SQL statement or index problem is indicated when an application seems to be spending a lot of time in DB2. That is, when the class 2 elapsed time is not significantly greater (50% or more) than the class 2 CPU (TCB).

Access path problems can also be indicated by a high number of Getpage operations for an SQL statement.

If you are using dynamic SQL, you can use the EXPLAIN statement to obtain information about each statement.

For static SQL, unless you know the text of a suspect statement or the statement number, use the Explain reports at the plan or package level.