The stupid question is the question not asked | |
PerlMonks |
Re^3: Sequences, last_insert_id, SQLite, and Oracleby sharkey (Scribe) |
on Jun 17, 2005 at 04:28 UTC ( [id://467556]=note: print w/replies, xml ) | Need Help?? |
That is complete and utter misinformation.
Fortunately Oracle has a much better grasp on concurrency issues than you do. Oracle sequences are designed to support heavy transactional loads. One thing they sacrifice for this is guaranteed serial-ness of the numbers. Each session gets its own cache of sequence numbers, so that it can avoid needing to lock the sequence every time you ask for a new number. The number you get from NEXTVAL will be the number you get from CURRVAL, and no other sessions can affect your value, because it is private to your session. You even get an error if you ask for the CURRVAL before you have asked for a NEXTVAL in this session.
In Section
Seekers of Perl Wisdom
|
|