Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: When does ROWID change ?
jdefreitas_at_my-deja.com wrote:
> In article <s96a5ssjrcfps1vgbg9505f78kr63tq9ue_at_4ax.com>,
> tkyte_at_us.oracle.com wrote:
> > A copy of this was sent to QuestionExchange
> <USENET_at_questionexchange.com>
> > (if that email address didn't require changing)
> > On 13 Dec 1999 15:41:52 GMT, you wrote:
> >
> > >The rowid basically indicates the physical location of the row
> > >on disk. One would think that it would be relatively safe to
> > >use this as a key, but Oracle can, in some conditions, move
> > >things around without you knowing it. For example, if your row
> > >grows in size (i.e. due to a varchar increase in size), Oracle
> > >can move the row to someplace else.
> >
> > but that'll not change the rowid. A migrated or chained row does not
> cause a
> > rowid to change.
> >
> > >To sum up, the rowid is only good within a query or PL/SQL, and
> > >should never be stored as a foreign key to another table.
> >
> > The only times a rowid will change (and they are all Oracle8i release
> 8.1
> > specific) that I am aware of are:
> >
> > - if you explicitly enable "row movement" in a partitioned table and
> modify the
> > partition key causing it to move from partition to partition
> >
> > - IOTs (with only started having rowids in 8i) can have the rowid
> change (its
> > not really a rowid in the conventional sense in an IOT)
> >
> > A rowid is good within a transaction or, very commonly, from page to
> page in a
> > HTML application (cross transactions but short life span none the
> less).
> >
> > --
> > 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
> >
>
>
No. It means that you should add a SEQUENCE to the table. While it is true that a ROWID does not change I believe that a ROWID may be reused in the event of a row being deleted.
--
Once I figured out how to spell DBA I became one
-- Jerry Gitomer
Received on Thu Dec 30 1999 - 01:14:03 CST