Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^3: Sequences, last_insert_id, SQLite, and Oracle

by sharkey (Scribe)
on Jun 17, 2005 at 04:28 UTC ( [id://467556]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Sequences, last_insert_id, SQLite, and Oracle
in thread Sequences, last_insert_id, SQLite, and Oracle

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.

  • Comment on Re^3: Sequences, last_insert_id, SQLite, and Oracle

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://467556]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (7)
As of 2024-04-24 10:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found