Explain Menu
Use the Explain Menu to specify the Db2® subsystem where the Explain request is to be performed (optional), a different SQL authorization ID for qualifying the unqualified tables in the statements being explained, and to select an option for explaining an SQL statement.
To display the Explain Menu, select option 4 (Explain
) from the Online Monitor
Main Menu.
Use the Current server
field to specify the Db2 subsystem where you want the Explain request to be performed. This field makes it
possible that you are connected to a Db2 test subsystem
while you execute the Explain on the remote production system. The default value is the local
location.
Use the Current SQLID
field to specify a different SQL authorization ID for
qualifying the unqualified tables in the SQL statements to be explained. The Current
SQLID
field can also used to qualify the plan table to be accessed. The default value
is your user ID.
Whenever package or DBRM SQL statements are explained, the package or plan qualifier is used to qualify unqualified SQL statements. The package or plan owner is used to qualify the plan table.
- Select option 1 (
Explain an existing entry in the plan table
) to display the Plan Table Entry window, where you can interpret an existing entry in your plan table, or in another user’s plan table if you have the required Db2 authority. - Select option 2 (
Explain a package’s SQL statement
) to display the Package SQL Statement window, where you can explain an SQL statement for a previously bound package. - Select option 3 (
Explain a DBRM’s SQL statement
) to display the DBRM SQL Statement window, where you can explain an SQL statement for a previously bound plan. - Select option 4 (
Enter an SQL statement to be explained
) to display the SQL Text Entry window, where you can explain a dynamic SQL statement. After you specified the query number, the SQL Text Edit panel is displayed, where you can enter and explain a dynamic SQL statement.
Use these options, and related windows, to select the SQL statement you want to explain. The SQL statement is then explained, and the result displayed in the Db2 Explain Output panel.