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 9 (Explain) from the Online Monitor
Main Menu.
DGOMYPMN Explain Menu
Local location . . . . . . . : PMODB2A SDA2 V10
Current server . . . . . . . : PMODB2A SDA2 V10
Change current server if required, then select one of the following.
_ 1. Explain an existing entry in the plan table
2. Explain a package's SQL statement
3. Explain a DBRM's SQL statement
4. Enter an SQL statement to be explained
Current server . . . . . . . . PMODB2A_______________________ +
Current SQLID . . . . . . . . PMDEV51_______________________ +
Command ===> ______________________________________________________________
F1=Help F2=Split F3=Exit F9=Swap F12=Cancel F21=Expand F22=Left
F23=Right
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.