IBM Support

Configuring the cache size for sequences

Question & Answer


Question

How do I configure the cache size for sequences?

Answer

When a sequence is defined, it pre-allocates sequence numbers to each SPU.   

1. To control the number of pre-allocations, set the enable_sequence_cachesize parameter in one of the following ways:

---at the nzsql command line:
Set enable_sequence_cachesize=1;

---or  within the /nz/data/postgresql.conf file:
enable_sequence_cachesize=1

If you chose to enable the parameter by modifying the postgresql.conf file and you want to make the change effective immediately, you need to restart the database as follows:

nzstop

nzstart

If a database restart is unacceptable, refer to "How do I enable changes to postgresqlconf without causing a database outage?"

2. After the enable_sequence_cachesize parameter is enabled, use the following syntax to control the cache size when defining a sequence:

           Create sequence seq1 as integer cache 1000;

[{"Product":{"code":"SSULQD","label":"IBM PureData System"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Database","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"1.0.0","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Historical Number

NZ098450

Document Information

More support for:
IBM PureData System

Software version:
1.0.0

Document number:
464089

Modified date:
17 October 2019

UID

swg21571919