Listing plan table rows
A plan table, PLAN_TABLE, is a Db2® EXPLAIN table that contains access path information for SQL statements.
Procedure
What to do next
Use this panel to see how Db2 will execute SQL statements. This information is gathered from previously executed EXPLAIN statements and from Db2 BIND commands that specify EXPLAIN(YES).
You can view the information on this panel in different formats. To switch between formats, use the following primary commands:
- COL
- Package mode, which shows Collection (COLLID) and Progname (PACKG)
- HINT
- Hint mode, which shows Hint ID and Hint Used
- INDEX
- Index information
- TABLE
- Table information
- COPY
- Copy displayed rows to another PLAN_TABLE
- ACCEL
- Accelerator server information. This format is available only if you are using an accelerator.
To display the interpretation information for any queries, issue line command I.
For accelerated queries, I displays an interpretation panel similar to the panel in the following figure. Accelerated queries have an access type of A (accesstype = 'A').
ADBPELI n ------- Interpretation of Row from DSN_QUERYINFO_TABLE --------- 10:35
Command ===>
More: +
DB2 System: DD1A
Data as produced by EXPLAIN:
_ DECLARE C1 CURSOR FOR SELECT * FROM SYSADM.TBOC5I03
-------------------------------------------------------------------------------
| Query is marked to be offloaded to an accelerator. |
| Query qualifies for routing to an accelerator. |
| |
| |
-------------------------------------------------------------------------------
Table schema . . : SYSADM Table name . . : TBOC5I03
Accelerator name : ZGRYPHON Location name : DB2EC1
Query number . . : 2 Query blk no . : 1
Application name : DSNTEP3 Program name . : DSNTEP3
Access type . . : A Version . . . : 2
Collid . . . . . : Group member . :
Sectnoi . . . . : Seqno . . . . :
Explain date . . : 2013-01-31 Explain time . : 04.24.32.67
Reason code : 0 Service info . :
In addition to the EXPLAIN information, this panel states whether the query is marked to be offloaded to an accelerator and whether it is qualified to be routed to an accelerator. If the query is not qualified to be offloaded to an accelerator, the reason is stated on the panel.