The SYSSEQUENCES table describes the sequence generators in the database.

Users should not directly query the SYSSEQUENCES table, because that will slow down the performance of sequence generators. Instead, users should call the  SYSCS_UTIL.SYSCS_PEEK_AT_SEQUENCE system function

The following table shows the contents of the SYSSEQUENCES system table.

SYSSEQUENCES system table
Column Name Type Length Nullable Contents
SEQUENCEID CHAR 36 NO The ID of the sequence generator. This is the primary key.
SEQUENCENAME VARCHAR 128 NO The name of the sequence generator. There is a unique index on (SCHEMAID, SEQUENCENAME).
SCHEMAID CHAR 36 NO The ID of the schema that holds the sequence generator. There is a foreign key linking this column to SYSSCHEMAS.SCHEMAID.
SEQUENCEDATATYPE com.splicemachine.db.catalog.TypeDescriptor -1 NO System type that describes the precision, length, scale, nullability, type name, and storage type of the data

The current value of the sequence generator. This is not the actual next value for the sequence generator. That value can be obtained by calling the system function SYSCS_UTIL.SYSCS_PEEK_AT_SEQUENCE.

SYSSEQUENCES.CURRENTVALUE holds the end of the range of values that have been preallocated in order to boost concurrency. The initial value of this column is STARTVALUE.

This column is NULL only if the sequence generator is exhausted and cannot issue any more numbers.

STARTVALUE BIGINT 19 NO The initial value of the sequence generator
MINIMUMVALUE BIGINT 19 NO The minimum value of the sequence generator
MAXIMUMVALUE BIGINT 19 NO The maximum value of the sequence generator
INCREMENT BIGINT 19 NO The step size of the sequence generator

If the sequence generator cycles, this value is 'Y'.

If the sequence generator does not cycle, this value is 'N'.

See Also