Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: where rowid = ...

Re: where rowid = ...

From: Howard J. Rogers <howardjr_at_www.com>
Date: Thu, 14 Jun 2001 07:33:11 +1000
Message-ID: <3b27dc42@news.iprimus.com.au>

"John Darrah" <john.darrah_at_usa.net> wrote in message news:4af5a619.0106130915.e4d7557_at_posting.google.com...
> I thought IOTs had a UROWID associated with them.

Yes they do, provided you are working in 8i. In 8.0 they did not.

And in 8i they aren't the same as true ROWIDs (otherwise they wouldn't have a different name!), and I haven't the foggiest idea how they work (well, not quite true, but I'm making a point here!), and I'm not sure that we can vouch for their immutability in the same way as you can for ROWIDs.... after all, what happens at a block split?

Regards
HJR
>I was able to
> select one out of an IOT I built (*BAIAAsYEwwZDWwLBC/4) and they work
> with the "where current of <cursor>" syntax which I had always assumed
> did a "where rowid = " under the covers. I've found rowids useful in
> pl/sql procedures as long as your not hardcoding the actual value in
> the procedure.
>
> "Howard J. Rogers" <howardjr_at_www.com> wrote in message
 news:<3b272399$1_at_news.iprimus.com.au>...
> > Well, I wouldn't be relying on it in the sense of hard-coding it into my
> > application. Not with the 'move tablespace' command so ready to hand
 (in
> > 8i, natch).
> >
> > One export, drop and import later, and the rowid in the code has just
 gone
> > west, too (any version you care to mention).
> >
> > As for the indexes working pretty darned well... mmm, Move tablespace
> > requires a rebuild of the indexes. Import causes indexes to be
 re-created.
> > And then there's the little matter of row migration, where the index
 simply
> > points to the wrong place, and we have to do two i/os to retrieve the
 row.
> >
> > And the rowid for an IOT would be, er, what exactly?
> >
> > So no, it's not a bunch of nonsense. Rowids have their uses, but
 strictly
> > limited.
> >
> > HJR
> > --
> > =============================!!=============================
> > The views expressed are my own only, and definitely NOT those of Oracle
> > Corporation
> > =============================!!=============================
> >
> >
> > "Daniel A. Morgan" <dmorgan_at_exesolutions.com> wrote in message
> > news:3B26F78A.6339147B_at_exesolutions.com...
> > > Alex Filonov wrote:
> > >
> > > > Steffen Ramlow wrote:
> > > >
> > > > > how efficient is a whereclause like:
> > > > >
> > > > > where rowid = '...'
> > > >
> > > > It's the most efficient. And most stupid, too. You can never rely on
> > > > rowid, read documentation.
> > >
> > > That is a bunch of nonsense left standing alone as you wrote it. There
> > > are certainly situations where it can not be relied upon. But there
 are
> > > an awful lot where it is the best, most efficient, method of locating
 a
> > > record.
> > >
> > > If you are going to make statements such as you did you should qualify
> > > them with the specific conditions under which they are true. You
 might,
> > > for example, note that EVERY index in Oracle locates records by their
> > > rowid and that seems to work pretty darned well.
> > >
> > > Daniel A. Morgan
> > >
Received on Wed Jun 13 2001 - 16:33:11 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US