Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

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

by etcshadow (Priest)
on Jun 15, 2005 at 19:45 UTC ( #467035=note: print w/ replies, xml ) Need Help??


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

Well, if by "sequence" you meant "table in which you store a deliberately incremented value", then yes, with all the points you mentioned. The problem with that is, as you mentioned, all the ridiculous amounts of contention you get (and setting yourself up for big problems with deadlocking as a result). Of course, when you say "sequence" in the context of auto-increment tables, specifically in an oracle-specific context, it's pretty fair to assume that "sequence" means "oracle sequence", so I don't feel so bad for misinterpretting :-)

In one of my other replies in this thread I mentioned how you could do that etc, etc. The "right way" would be, in fact, to implement your own sequence by way of autonomous subtransactions (another oracle-specific feature... not to say that no other RDBMSs support them, but certainly not all RDBMSs support them).

------------ :Wq Not an editor command: Wq


Comment on Re^5: Sequences, last_insert_id, SQLite, and Oracle
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (12)
As of 2014-12-26 18:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (174 votes), past polls