Sequences in a distributed system

Netezza Performance Server uses the number of sequence values and the number of SPUs to create cache pools of sequence numbers that are distributed to the Netezza Performance Server host and to each SPU. In the Netezza Performance Server topology, this is a performance benefit because there is no unnecessary traffic between the SPUs and the host for the next value call.

When a query that runs on the host selects the next value in the sequence, the next available sequence number in the host cache pool is allocated. Likewise, when a query is running on a SPU, the next available sequence number in the SPU cache pool is allocated. Thus, the next sequence value can sometimes be an unexpected value because the next value depends on where the query is running in the Netezza Performance Server topology.

Sequences can be declared as 8-bit, 16-bit, 32-bit, or 64-bit integers and the cache size is a function of the number of distinct values in one complete cycle of the sequence (so it depends on the declared minvalue, maxvalue, and increment of the sequence).