SQL/MX 2.x Reference Manual (G06.24+, H06.03+)
SQL/MX Functions and Expressions
HP NonStop SQL/MX Reference Manual—523725-004
9-56
Considerations for EXPLAIN
attributes. See the MODULE Directive on page 3-71. For information on module
management attributes, see the SQL/MX Programming Manual for C and COBOL
or the SQL/MX Programming Manual for Java.
The module name is enclosed in single quotes and is case-sensitive. If a module
name is uppercase, the value you specify within single quotes must be uppercase.
For example: 'MYCAT.MYSCH.MYPROG'
NULL
explains statements prepared in the MXCI session.
'statement-pattern'
is a character string that specifies the pattern for searching for the names of SQL
statements within the given module. If the module is specified as NULL, the pattern
string is used to match statement names that have been used in PREPARE
statements within the current MXCI session.
A statement pattern is enclosed in single quotes and is case-sensitive. The
statement name must be in uppercase, unless you delimit the statement name in a
PREPARE statement. The pattern can include wild-card characters as in a LIKE
pattern. See LIKE Predicate on page 6-96.
Considerations for EXPLAIN
Using a Statement Pattern
Using a statement pattern is analogous to using a LIKE pattern. For example, this
statement returns the EXPLAIN result for all statements prepared within the current
MXCI session:
SELECT * FROM TABLE (EXPLAIN (NULL,'%'))
This statement returns the EXPLAIN result for all statements prepared within the
embedded SQL module named MYCAT.MYSCH.MYPROG:
SELECT * FROM TABLE (EXPLAIN ('MYCAT.MYSCH.MYPROG','%'))
This statement returns the EXPLAIN result for all prepared statements whose names
begin with the uppercase letter 'S':
SELECT * FROM TABLE (EXPLAIN (NULL,'S%'))
If the statement pattern does not find any matching statement names, no rows are
returned as the result of the SELECT statement.
For more information about module names, see the SQL/MX Programming Manual for
C and COBOL or the SQL/MX Programming Manual for Java.
MXCI