SQL/MX 3.1 Query Guide (H06.23+, J06.12+)

SQL/MX Operators
HP NonStop SQL/MX Release 3.1 Query Guide663851-001
7-68
SORT_GROUPBY Operator
WHERE p_partkey = ps1.ps_partkey
AND s1.s_suppkey = ps1.ps_suppkey
AND s1.s_nationkey = n1.n_nationkey
AND n1.n_regionkey = r1.r_regionkey
AND r1.r_name = 'EUROPE')
ORDER BY s_acctbal desc, n_name, s_name, p_partkey;
DESCRIPTION
fragment_id ............ 0
parent_frag ............ (none)
fragment_type ........... master self_referencing_update
forced_sort
sort_key ...............
inverse(DETCAT.DETSCH.SUPPLIER.S_ACCTBAL),
DETCAT.DETSCH.NATION.N_NAME,
DETCAT.DETSCH.SUPPLIER.S_NAME,
DETCAT.DETSCH.PSX1.PS_PARTKEY
SORT_GROUPBY Operator
Groupby Group
The SORT_GROUPBY operator describes a portion of an execution plan that affects a
group.
The SORT_GROUPBY operator has one child node. The description field for this
operator contains:
The following is an example of the SORT_GROUPBY operator:
prepare TestQuery33a from
select int64_6,count(*)
from PTAB09
where int64_6 IN (0,2,4,5)
group by int64_6;
DESCRIPTION
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 68 Monday, October 17, 2011 11:48 AM