Concurrent Access to a Sequence
A sequence always generates unique values within a database without perceptible waiting or locking, even when multiple users refer to the same sequence concurrently. When multiple users use NEXTVAL to increment the sequence, each user generates a unique value that other users cannot see.
When multiple users concurrently increment the same sequence,
gaps occur between the values that each user sees. For example, one
user might generate a series of values, such as 1
, 4
, 6
,
and 8
, from a sequence, while another user concurrently
generates the values 2
, 3
, 5
,
and 7
from the same sequence object.