SYSCS_UTIL.SYSCS_PEEK_AT_SEQUENCE Function

The SYSCS_UTIL.SYSCS_PEEK_AT_SEQUENCE function allows users to observe
the instantaneous current value of a sequence generator without having
to query the SYSSEQUENCES system
table.

Querying the SYSSEQUENCES table does not actually return the current
value; it only returns an upper bound on that value, which is the end of
the chunk of sequence values that has been pre-allocated but not yet
used.

The SYSCS_UTIL.SYSCS_PEEK_AT_SEQUENCE function shows you the very next
value that will be returned by a NEXT VALUE FOR clause. Users should
never directly query the SYSSEQUENCES table, because that will cause
sequence generator concurrency to slow drastically.