SQL/MX 3.1 Query Guide (H06.23+, J06.12+)
SQL/MX Operators
HP NonStop SQL/MX Release 3.1 Query Guide—663851-001
7-45
MERGE_UNION Operator
fragment_id ............ 0
parent_frag ............ (none)
fragment_type .......... master
join_type .............. inner semi
join_method ............ merge
merge_join_predicate ... (DETCAT.DETSCH.ORDERS.O_ORDERKEY =
DETCAT.DETSCH.LINEITEM.L_ORDERKEY)
MERGE_UNION Operator
MERGE_UNION Group
The MERGE_UNION operator describes that part of an execution plan that merges
rows from two child nodes. The operator for a MERGE_UNION operator is always
MERGE_UNION.
The MERGE_UNION operator has two child nodes. The description field for this
operator contains:
The following is an example of the MERGE_UNION operator:
create table table_a
(col1 char(5) NOT NULL NOT DROPPABLE
, col2 int NOT NULL NOT DROPPABLE
, col3 smallint
, CONSTRAINT table_a_PRIMARY_KEY PRIMARY KEY (col1 ASC, col2
ASC) NOT DROPPABLE
);
create table table_c like table_a;
Token Followed by ... Data Type
fragment_id A sequential number assigned to the fragment.
0 is always the master executor and 1 is
reserved for the EXPLAIN plan. Numbers 2 to n
will be ESP or DAM fragments.
integer
parent_frag The fragment_id for the parent of the current
fragment. The value is (none) for the master
executor.
integer
fragment_type Master, ESP, or DP2. text
condExpr Expression used for conditional union. Occurs
with IF statement in compound statements.
expr(text)
merge_expression Expression used to determine which child
operator to read from next—read from left if true
and read from right if false.
expr(text)
union_type Merge, physical or unspecified. text
sort_order Sort order of the result of the union. text
trigExceptExpr Expression used for trigger exceptions. expr(text)
TP663851.fm Page 45 Monday, October 17, 2011 11:48 AM










