Neoview Query Guide (R2.2)

Merge Joins
In a merge join, both tables are required to be sorted on the join column. A buffer of rows is read
from the inner and outer tables, and a row from the outer table is used to match inner table rows
in a match-merge pattern.
MERGE_JOIN Operator
The MERGE_JOIN operator describes a portion of an execution plan that involves a merge join.
This operator joins the data from its two child operators. The data streams from both children
must be in the same order. The operator joins all matching rows from each data stream. The
MERGE_JOIN operator works only with equijoins.
The MERGE_JOIN operator has two child operators. The description field for this operator
contains:
Data TypeToken DescriptionToken
integerA sequential number assigned to the fragment. 0 is always master
executor and 1 is reserved for the Explain plan. Numbers 2 to n will be
ESP or DAM fragments.
fragment_id
integerThe fragment_id for the parent fragment of the current fragment. Value
is (none) for master executor.
parent_frag
textmaster, ESP, or DAMfragment_type
textInner, union, or natural joinjoin_type
textName of join method: mergejoin_method
text1 for Type1 or 2 for Type2, depending on parallel join algorithmparallel_join_type
expr(text)Expression of the join predicatemerge_join_predicate
expr(text)Expression of the WHERE clause that is not included in the
merge_join_predicate or in a selection_predicates of any children
selection_predicates
MERGE_SEMI_JOIN Operator
The MERGE_SEMI_JOIN operator returns one row for the first match it finds in the inner table.
Conversely, MERGE_JOIN returns a row for all matches in the inner table. See “MERGE_JOIN
Operator” (page 40).
The MERGE_SEMI_JOIN operator has two child operators. The description field for this operator
contains:
Data TypeToken DescriptionToken
integerA sequential number assigned to the fragment. 0 is always master
executor and 1 is reserved for the Explain plan. Numbers 2 to n will be
ESP or DAM fragments.
fragment_id
integerThe fragment_id for the parent fragment of the current fragment. Value
is (none) for master executor.
parent_frag
textmaster, ESP, or DAMfragment_type
textInner-semi or natural semi-joinjoin_type
textName of join method: mergejoin_method
text1 for Type1 or 2 for Type2, depending on parallel join algorithmparallel_join_type
expr(text)Expression of the join predicatemerge_join_predicate
expr(text)Expression of the WHERE clause that is not included in the
merge_join_predicate or in a selection_predicates of any children
selection_predicates
40 Query Plan Operators