Beefy Boxes and Bandwidth Generously Provided by pair Networks Bob
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Sequences, last_insert_id, SQLite, and Oracle

by Solo (Deacon)
on Jun 14, 2005 at 13:56 UTC ( [id://466658]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to Sequences, last_insert_id, SQLite, and Oracle

Sidestep the sequence issue altogether and use GUIDs or UUIDs.

--Solo

--
You said you wanted to be around when I made a mistake; well, this could be it, sweetheart.
  • Comment on Re: Sequences, last_insert_id, SQLite, and Oracle

Replies are listed 'Best First'.
Re^2: Sequences, last_insert_id, SQLite, and Oracle
by gaal (Parson) on Jun 14, 2005 at 14:52 UTC
    Thanks — this is an interesting approach I hadn't thought of.

    My IDs should ideally be fit for human consumption, so 128 bits is a little long, though. The kind of volume I'm expecting, there won't be more than a few IDs to generate every hour in phase one, then maybe a few a minute in phase two, but with rather fewer than that on average. In terms of address space, an eight- or nine-numeral wide decimal number ought to suffice for the lifetime of the project and that allows for quite some margin of error. Of course I'll allow for more than that in the database, but in thinking of how this would be used I'm comfortable with assuming the user would occasionally (not often) have to handle an identifier like "6126-7245".

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://466658]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.