SQL/MX Programming Manual for Java
Processing SQLJ Programs
HP NonStop SQL/MX Programming Manual for Java—523726-003
5-47
Displaying the Query Execution Plans of All
Statements
module definitions, see the ProfilePrinter Tool on page 5-42. For example, the
statement name might look like this:
MX_STMT_0_1
MX_CRSR_SAMPLEDML_SJPROFILE0_1044570612291_5
MX_DEFAULT_STATEMENT_0
Displaying the Query Execution Plans of All Statements
To display the EXPLAIN output for all DML statements in a module, issue this
statement in MXCI:
Module Name
The module-name is the full name of a module, is case-sensitive, and must be placed
within single quotes:
'CAT.SCH.GRP1^MOD1^TABLESET1^VER1'
The module name is either specified by the MODULE directive in the SQLJ source file
or by the translator if you did not use a MODULE directive. For more information about
the module name, see the MODULE Directive on page 4-12.
Wild Card (%)
Instead of specifying a statement pattern, use the percent sign (%) to represent all the
DML statements in the module. The percent sign (
%) must be placed within single
quotes:
'%'
For information about how to interpret the output of the EXPLAIN function, see the
SQL/MX Query Guide.
SELECT * FROM TABLE(EXPLAIN('module-name', '%'));
Note. Do not confuse module files, which do not have file extensions and reside in the
/usr/tandem/sqlmx/USERMODULES directory, with module definition files (.m), which are
optionally generated during SQLJ processing and are precursors to modules. For more
information, see Module
on page 1-16 and Module Definition File on page 1-19.