SQL/MX 2.x Query Guide (G06.24+, H06.03+)
Operators and Operator Groups
HP NonStop SQL/MX Query Guide—523728-003
7-37
PACK Operator
The example of the ORDERED_HASH_SEMI_JOIN operator is based on:
SELECT *
FROM customer ,nation
WHERE c_custkey > 10000
AND c_custkey < 10010
AND c_nationkey IN(select n_nationkey from nation)
ORDER BY c_custkey
? XX
211932229506956715 8 ORDERED_HASH_SEMI_JOIN
7 4
1.1000000E+001 2.3594854E-003 8.3467796E-002
CPU_TIME: 0.001631 IO_TIME: 0.000999 MSG_TIME: 0 IDLETIME: 0
PROBES: 1
hash_join_predicate:
(indexcol(TPCDF.SF100F.CUSTOMER.C_NATIONKEY) =
indexcol(TPCDF.SF100F.NATION.N_NATIONKEY))
join_type: inner semi
join_method: hash
PACK Operator
Rowset Group
Use the PACK operator in a query plan when selecting rows into rowset arrays:
SELECT <list> INTO <list of arrays> <body of query>
The PACK operator collects all the rows coming from the body of the query and puts
them into the arrays in the <list of arrays>. For more information about rowsets
and arrays, see the SQL/MX Programming Manual for C and COBOL.
The PACK operator has one child. The description field for this operator contains:
The example of the PACK operator is based on this rowset. The output has been
formatted for readability.
Output from MDF file:
PROCEDURE SQLMX_DEFAULT_STATEMENT_3 ("staff_num" ROWSET 5
CHARACTER(3),
"staff_name" ROWSET 5 CHARACTER(20),"staff_grade" ROWSET 5
Token Followed by... Data Type
pack_expr Expression used to pack
values of a row into a packed
row
expr(text)