SQL/MX 3.2.1 Query Guide (H06.26+, J06.15+)
SQL/MX Operators
HP NonStop SQL/MX Release 3.2.1 Query Guide—663851-003
7-74
SORT_PARTIAL_GROUPBY_ROOT Operator
The following is an example of the SORT_PARTIAL_GROUPBY_LEAF operator:
control query shape
sort_groupby(partition_access(sort_groupby(scan)));
prepare TestQuery33 from
select int64_6,count(*)
from PTAB09
where int64_6 IN (0,2,4,5)
group by int64_6;
DESCRIPTION
fragment_id ............ 2
parent_frag ............ 0
fragment_type .......... dp2
grouping_columns ....... DETCAT.DETSCH.PTAB09.INT64_6
aggregates .............. count(1 )
SORT_PARTIAL_GROUPBY_ROOT Operator
Groupby Group
The SORT_PARTIAL_GROUPBY_ROOT operator works together as a pair with the
SORT_PARTIAL_GROUPBY_LEAF operator. The
SORT_PARTIAL_GROUPBY_ROOT operator finalizes the group by at the ESP level.
The SORT_PARTIAL_GROUPBY_ROOT operator has one child node. The description
field for this operator contains the following:
The following is an example of the SORT_PARTIAL_GROUPBY_ROOT operator:
control query shape
sort_groupby(partition_access(sort_groupby(scan)));
prepare TestQuery33 from
select int64_6,count(*)
from PTAB09
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
aggregates Expression of the aggregate function. expr(text)
selection_predicate Expression of the HAVING clause. expr(text)
grouping_columns Expression of the grouping columns. expr(text)
TP663851.fm Page 74 Wednesday, January 30, 2013 5:37 PM










