Neoview Query Guide (R2.2)

Miscellaneous Operators
FIRSTN Operator
The FIRSTN operator implements the first or any number of rows functionality. For example,
SELECT [FIRST 2] * FROM T; the operator is used to return the first 2 (or n) rows returned
by the child. This operator is also used to implement the last 0 functionality, which processes all
rows and returns none.
Data TypeToken DescriptionToken
integerA sequential number assigned to the fragment. 0 is always master
executor and 1 is reserved for the Explain plan. Numbers 2 to n will
be ESP or DAM fragments.
fragment_id
integerThe fragment_id for the parent fragment of the current fragment.
Value is (none) for master executor.
parent_frag
textmaster, ESP, or DAMfragment_type
SEQUENCE Operator
The SEQUENCE operator occurs as a result of a SEQUENCE BY clause in the query.
The SEQUENCE operator has one child operator. The description field for this operator contains:
Data TypeToken DescriptionToken
integerA sequential number assigned to the fragment. 0 is always master
executor and 1 is reserved for the Explain plan. Numbers 2 to n will
be ESP or DAM fragments.
fragment_id
integerThe fragment_id for the parent fragment of the current fragment.
Value is (none) for master executor.
parent_frag
textmaster, ESP, or DAMfragment_type
integerSize of the history buffer (in rows). This number of rows is kept in a
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.
num_history_rows
integerSize of each history row in the history buffer.history_row_size
expr(text)List of column references specifying the ordering required by the
SEQUENCE operator. Obtained from a list of columns specified in
the SEQUENCE BY clause.
required_order
ItemExpr treeRepresentation of the list of sequence functions that must be evaluated
by this SEQUENCE operator.
sequence_functions
textColumns in the select list that are being sequencedsequence_columns
62 Query Plan Operators