Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: When does ROWID change ?
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
>
So, does this mean in a scenario where records are constantly being written to a table, and a batch process records the ROWID of the last row inserted in the table, I can tell which records were written before this time or after this time by comparing ROWIDs in a "less than" or "greater than" logical comparison?
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Wed Dec 15 1999 - 15:55:56 CST
![]() |
![]() |