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 18: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".