SQL/MX 2.x Query Guide (H06.04+, J06.03+)
SQL/MX Operators
HP NonStop SQL/MX Query Guide—540437-005
7-58
SAMPLE Operator
AS BIG NUM(12,2) SIGNED))) /
cast(100 AS BIG NUM(3) SIGNED)) AS
NUMERIC(18,2) SIGNED) AS
NUMERIC(18,2) SIGNED)
SAMPLE Operator
Data Mining Group
The SAMPLE operator occurs as a result of a sample clause in a query.
The SAMPLE 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 example of the SAMPLE operator is based on:
prepare TestQuery34 from
select [first 180] * from t064t5
sample periodic 1 rows every 100 rows
for read uncommitted access;
DESCRIPTION
fragment_id ............ 2
parent_frag ............ 0
fragment_type .......... dp2
sample_type ............ PERIODIC
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 fragment of the
current fragment. The value is (none) for the
master executor.
integer
fragment_type Master, ESP, or DP2. text
sampled_columns List of column references representing the
outputs of the sample operator. Indicates that
the column has been sampled.
expr(text)
balance_expression Expression representing the sampling
expression. A simple random selection, but
could be more complex if the sample clause
contains a balance clause.
expr(text)
sample_type Indicates the type of sampling being
performed. Possible values are RANDOM,
PERIODIC, FIRST, and CLUSTER.
text
required_order Specified order keys for a sample operation. expr(text)










