Enterprise Edition Home | Express Edition Home | Previous Page | Next Page   SQL Statements > CREATE SEQUENCE >

CACHE or NOCACHE Option

Use the CACHE option to specify the number of sequence values that are preallocated in memory for rapid access. This feature can enhance the performance of a heavily used sequence. The cache size must be a positive whole number in the INT range. If you specify the CYCLE option, then size must be less than the number of values in a cycle (or less than |(max - min)/step|). The minimum is 2 preallocated values. The default is 20 preallocated values.

The NOCACHE keyword specifies that no generated values (that is, zero) are preallocated in memory for this sequence object.

The configuration parameter SEQ_CACHE_SIZE specifies the maximum number of sequence objects that can have preallocated values in the sequence cache. If this configuration parameter is not set, then by default no more than 10 different sequence objects can be defined with the CACHE option.

Enterprise Edition Home | Express Edition Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]