SQL/MX 3.x Query Guide (H06.22+, J06.11+)
SQL/MX Operators
HP NonStop SQL/MX Query Guide—640323-001
7-62
SHORTCUT_SCALAR_AGGR Operator
For more information about data mining, see the SQL/MX Data Mining Guide.
The following is an example of the SEQUENCE operator:
prepare TestQuery24 from
SELECT RUNNINGCOUNT(*) FROM customer
SEQUENCE BY c_custkey, c_nationkey;
DESCRIPTION
fragment_id ............ 0
parent_frag ............ (none)
fragment_type .......... master
num_history_rows ....... 1,024
history_row_size ....... 16
required_order ......... DETCAT.DETSCH.CX1.C_CUSTKEY,
DETCAT.DETSCH.CX1.C_NATIONKEY
sequence_functions ..... (replace null(offset(\:_sys_Result),
cast(offset(\:_sys_Result) AS
LARGEINT), cast(0 AS LARGEINT)) +
replace null(1 , cast(1 AS INTEGER
SIGNED), cast(0 AS INTEGER
SIGNED)))
SHORTCUT_SCALAR_AGGR Operator
Groupby Group
The SHORTCUT_SCALAR_AGGR operator occurs for aggregates without a GROUP
BY clause and returns one row. The description field for this operator contains:
sequence_functions Represents the list of sequence functions that
must be evaluated by this SEQUENCE
operator.
ItemExpr
tree
num_history_rows Size of the history buffer (in rows). This
number of rows is kept in an integer buffer and
is available for access by the sequence
functions. Any access to a row outside this
buffer results in a NULL value. The default
value for this parameter is 1024 rows.
integer
history_row_size Size of each history row in the history buffer. integer
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










