EXPLAIN command

Use the EXPLAIN command to examine the access path methods that were chosen by DB2® for the currently executing SQL statement of a thread.

The EXPLAIN command can be issued from the following Thread Activity windows:
  • SQL Statement and Package
  • SQL Statement and DBRM
The EXPLAIN command can also be issued from the Thread Detail panel if it has been tailored to show the SQL statement text.
The command syntax is:
Figure 1. Syntax of the EXPLAIN command
Read syntax diagramSkip visual syntax diagramEXPLAIN

Invoking Explain

To examine the access path methods chosen by Db2 for an SQL statement shown in a Thread Activity panel, type EXPLAIN on the command line and press Enter. EXPLAIN can be truncated to a minimum of EXP.

For more information about how to explain an SQL statement, see Monitoring the access path with Explain.