SQL/MX 3.2.1 Query Guide (H06.26+, J06.15+)

SQL/MX Operators
HP NonStop SQL/MX Release 3.2.1 Query Guide663851-003
7-73
SORT_PARTIAL_GROUPBY_LEAF Operator
The following is an example of the SORT_PARTIAL_AGGR_ROOT operator:
prepare TestQuery17 from
select T03.char_100
from PTAB03 T03
where T03.char_100 =
(Select min(T00.char_10)
from PTAB00 T00);
DESCRIPTION
fragment_id ............ 0
parent_frag ............ (none)
fragment_type .......... master
aggregates .............
min(min(DETCAT.DETSCH.PTAB00.CHAR_10))
SORT_PARTIAL_GROUPBY_LEAF Operator
Groupby Group
The SORT_PARTIAL_GROUPBY_LEAF operator executes a partial group by as close
to where the data is read as is cost effective. This strategy reduces the amount of data
that must be redistributed for a query. The operator must always be accompanied by a
SORT_PARTIAL_GROUPBY_ROOT operator above it in the tree, which finalizes the
query.
The SORT_PARTIAL_GROUPBY_LEAF operator has one child node. The description
field for this operator contains the following:
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
aggregates Expression of the aggregate function. expr(text)
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
grouping_columns Expression of the grouping columns. expr(text)
aggregates Expression of the aggregate function. expr(text)
selection_predicates Expression of the HAVING clause. expr(text)
TP663851.fm Page 73 Wednesday, January 30, 2013 5:37 PM