SQL/MX 3.1 Query Guide (H06.23+, J06.12+)
SQL/MX Operators
HP NonStop SQL/MX Release 3.1 Query Guide—663851-001
7-64
SEQUENCE Operator
The SEQUENCE operator has one child node. The description field for this operator
contains:
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)))
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
required_order List of column references specifying the
ordering required by the SEQUENCE operator.
Obtained from a list of columns specified in the
SEQUENCE BY clause.
expr(text)
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
TP663851.fm Page 64 Monday, October 17, 2011 11:48 AM










