Updating nextval in sequence in oracle dating an americam man
In those cases, Oracle RAC applications must use the order clause to guarantee the sequence's values are generated in order, no matter which instance the next value was generated. Even though the sequence was denoted to cache sequence values and those values were selected from one instance, then the next and so on, the order clause ensured each subsequent value would be in numerical order.
The order clause effectively makes the sequence have a nocache setting.
Yet some applications need the sequences to denote time ordering, i.e.
a sequence value of 11 occurred some time prior to the record with the sequence value of 12.
Similar to examining the performance of a sequence in the previous section, the performance of the sequence using the order clause can be easily determined.
Normally, concurrent sessions might generate sequence values in this order: 1, 2, 21, 3, 22, 4, 23, and 24.However, when examined chronologically, the values are not in order.If the purpose of the sequence is to generate unique values, as is often done for synthetic primary keys, the fact that the values jump around when viewed over time is of little concern.The PL/SQL block took about 19 minutes to complete in the first instance.The same block took almost the same identical time to complete in the second instance.