Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Get a RowID with Oracle 8.1.5
A copy of this was sent to "Dirk Poppke" <poppke_at_iug.cs.uni-dortmund.de>
(if that email address didn't require changing)
On Thu, 20 Jan 2000 10:06:53 +0100, you wrote:
>Hello!
>
>I've got a simple newbee question:
>
>I wan't to get a unique rowid for a row in a table. Till now,
>i used a sequence, but the sequence didn't reuse numbers
>which are set free again (maybe by a delete Statement).
>
since a sequence is an Oracle number upto 28 digits a sequence has an extremely large range. Reuse of a sequence number should never be needed if you just want to get a unique identifier for a row. It'll take a *really* long time to exhaust the values in a sequence -- even if you lose millions or billions of them you'll only have lost a small percentage of
9,999,999,999,999,999,999,999,999,999
There are really no performant, reliable alternatives. Every other attempt i've ever seen causes serialization.
>The pseudo - column RowID works easier, but you can't
>migrate them to another DB.
>
and rowids (as of Oracle8i, release 8.1) can change for a row after its been inserted in certain cases (2 that i know of). You should not permanently store a rowid in another table anymore. You can use rowids for short transactions (eg: web transactions from page to page or as forms does to implement its locking scheme).
>Is there a better solution than this two ways?
>
>Thanx in advance,
>Dirk
>
--
See http://osi.oracle.com/~tkyte/ for my columns 'Digging-in to Oracle8i'...
Current article is "Part I of V, Autonomous Transactions" updated June 21'st
Thomas Kyte tkyte_at_us.oracle.com Oracle Service Industries Reston, VA USA
Opinions are mine and do not necessarily reflect those of Oracle Corporation Received on Thu Jan 20 2000 - 10:25:08 CST