SQL/MX 2.x Query Guide (G06.24+, H06.03+)
Forcing Execution Plans
HP NonStop SQL/MX Query Guide—523728-003
5-14
Forcing Parallel Plans
This shape forces a partial grouping in DAM with a consolidator grouping in the ESP or
master executor, as shown in Figure 5-5.
CONTROL QUERY SHAPE
GROUPBY(
SPLIT_TOP_PA(
GROUPBY(SCAN))
);
To force an operator to execute in the DAM without DAM parallelism, force a
PARTITION_ACCESS operator on top of the operator you want to run in the DAM.
However, the operator must be capable of the request. For example, a join cannot be
used for a direct request to the DAM. The operators that can make a direct request to
the DAM include scans and group bys.
Forcing Joins
The syntax for CONTROL QUERY SHAPE provides the ability to force certain types of
joins for parallel plans, as described next. For more information on Type1 (matching
partition algorithm) and Type2 (parallel access to the inner table) joins, see Section 8,
Parallelism.
•
Forcing a Type1 join
The matching partitions algorithm can be forced by specifying Type1 as part of the
join specification. To force a Type1 join without repartitioning, all criteria must
match for both tables. To force a Type1 join when the table criteria does not match,
Figure 5-5. Query Tree for the Forced Plan
root
hash_partial_groupby_root
split_top
partition_access
hash_partial_groupby_leaf
file_scan
DAM fragment
Master Executor
VST614.vsd