Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Rowid in Index organized tables

Status
Not open for further replies.

oralearner

Programmer
Nov 21, 2003
4
US
Oracle 8i complete reference says
"rows of the index organized tables do not have rowIDs. So, it is not possible to select rowid pseudo column from an IOT."

Here is what i tried..

create table test(c1 number primary key, c2 number) organization index;

Table created.

insert into test select rownum, rownum+rownum from tab;

82 rows created.

commit;

Commit complete.

select rowid from test;

ROWID
-----------------------------------------
*BADAI7MCwQL+
*BADAI7MCwQP+
*BADAI7MCwQT+
*BADAI7MCwQX+
*BADAI7MCwQb+
*BADAI7MCwQf+
*BADAI7MCwQj+
*BADAI7MCwQn+
*BADAI7MCwQr+
*BADAI7MCwQv+

create table test2 as select * from test;

Table created.

select rowid from test2;

ROWID
------------------
AAAHvfAADAAACgjAAA
AAAHvfAADAAACgjAAB
AAAHvfAADAAACgjAAC
AAAHvfAADAAACgjAAD
AAAHvfAADAAACgjAAE
AAAHvfAADAAACgjAAF
AAAHvfAADAAACgjAAG
AAAHvfAADAAACgjAAH
AAAHvfAADAAACgjAAI

select * from test where rowid in(select rowid from test);

C1 C2
---------- ----------
1 2
2 4
3 6
4 8
5 10
6 12

Can anyone explain what is *BADAI7MCwQv+ if it is nota RowId.
 
IOT's do not have regular (physical) row id's, but logical row id's to give the fastest possible access to to rows in the IOT.

That's what you see.

The logical row id uses two methods to access the table,
1. a physical guess whose access time is equal to that of physical row id's,
2. Access without a guess, after an incorrect guess.

The logical row id's are stored as a variable-length field, where the size depends on the prim key value stored.


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top