SQL/MX 2.x Reference Manual (H06.10+, J06.03+)

SQL/MX Statements
HP NonStop SQL/MX Reference Manual544517-008
2-143
EXPLAIN Statement
EXPLAIN Statement
Considerations for EXPLAIN
Examples of EXPLAIN
The EXPLAIN statement generates and displays the result of the EXPLAIN function,
describing an access plan for a SELECT, INSERT, DELETE, UPDATE, or CALL
statement. It displays the query execution plans in a readable format. It can
display plans from modules created by the SQL/MX compiler.
The EXPLAIN statement can also be used from JDBC or ODBC application like any
other SQL/MX Statement.
For a description of the result table of the EXPLAIN function, see EXPLAIN Function
on page 9-55.
You can use the EXPLAIN statement within an MXCI, JDBC, or ODBC session.
f
formatted.
n
normal user (default setting).
e
expert user.
m
machine readable format.
query-text
is a DML statement such as SELECT * FROM T3.
prepared-stmt-name
is an SQL identifier containing the name of a statement already prepared in this
session. An SQL identifier is not case sensitive unless it is double-quoted. It must
Note. The EXPLAIN statement is available only on systems running J06.09 and later J-series
RVUs and H06.20 and later H-series RVUs.
From release 2.3.4 onwards, SQL/MX does not support the DISPLAY_EXPLAIN command.
Use the EXPLAIN statement to display the query plans in a readable format.
EXPLAIN [options {'f' | 'n' | 'e' | 'm'}] {query-text |
prepared-stmt-name | 'stmt-name' from 'module-name'}