SQL/MX 3.2.1 Query Guide (H06.26+, J06.15+)
SQL/MX Operators
HP NonStop SQL/MX Release 3.2.1 Query Guide—663851-003
7-68
The following is an example of the
SEQUENCEGENERATOR operator:
The following is an example of the SEQUENCEGENERATOR operator:
CREATE SEQUENCE cat.sch.s1;
PREPARE SeqQuery1 FROM SELECT s1.NEXTVAL FROM (VALUES (1)) x;
DESCRIPTION
max_card_est ........... 1
fragment_id ............ 2
parent_frag ............ 0
fragment_type .......... esp
sg_start_with_option ... 1
sg_increment_option .... 1
sg_maximum_option ...... 9223372036854775807
sg_minimum_option ...... 1
sg_datatype ............ SIGNED LARGEINT
sg_cycle_option ........ NO CYCLE
sg_cache ............... 0
sg_cache_initial ....... 1
sg_cache_increment .... 10
sg_cache_maximum 10,000
sg_extended_precision 18
sg_type ................ EXTERNAL
sg_cache_maximum The maximum value that influences the default
adaptive cache. For details, see the
explanation for sg_cache_initial token.
int 64
sg_extended_precision The precision value of the data type of the
sequence generator {1,2,...,28}.
int 64
sg_type The type of sequence generator, EXTERNAL
or INTERNAL.
text
sg_currval_sys_host_var The expression holds the CURRVAL of the
sequence generator for the current session.
text
sg_increment_hv The expression contains the
sg_increment_option value. It is sent to
the NEXTVALUEFOR operator along with
sg_cache_size_hv and
current_value_from_sg to calculate the
next value.
expr(text)
sg_cache_size_hv The expression is used to calculate the
sequence generator cache size.
expr(text)
sg_min_value_hv The expression holds the minimum value of
sequence generator.
expr(text)
sg_max_value_hv The expression holds the maximum value of
sequence generator.
expr(text)
current_value_from_sg The expression holds the current value of the
sequence generator. Current value is the next
value available from the sequence generator.
expr(text)
TP663851.fm Page 68 Wednesday, January 30, 2013 5:37 PM










