SQL/MX 2.x Reference Manual (H06.04+)

MXCI Commands
HP NonStop SQL/MX Reference Manual540440-003
4-89
SHOWSHAPE Command
SHOWSHAPE Command
The SHOWSHAPE command displays the control query shape for a given DML
statement. You can use the result at a later time to force the same access plan for the
statement. See CONTROL QUERY SHAPE Statement on page 2-35 and SET
SHOWSHAPE Command on page 4-50.
Use SHOWSHAPE only within an MXCI session.
statement
is an SQL DML statement.
Considerations for SHOWSHAPE
Default Control Query Shape
You can use the SHOWSHAPE command for any SQL statement. For those
statements that do not have a shape—for example, the CREATE SCHEMA
statement—a control query shape (CQS) of the form CONTROL QUERY SHAPE
ANYTHING is issued.
CONTROL QUERY SHAPE ANYTHING resets the effect of any preceding CQSs. Its
use is especially important when CQSs are being generated from an input file of
commands and statements. See SET SHOWSHAPE Command on page 4-50.
Examples of SHOWSHAPE
Display the access plan for the given statement:
SHOWSHAPE
SELECT E.last_name, J.jobdesc
FROM persnl.employee E, persnl.job J
WHERE E.salary > 40000.00
AND E.jobcode = J.jobcode;
control query shape
nested_join(partition_access(scan(
'J', forward, mdam off)),
materialize(partition_access(scan(
'E', forward, mdam off))));
--- SQL operation complete.
SHOWSHAPE statement