Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: Index Organized tables: Please explain use?
--0__=0XPadVmOANmlcEdVuWCRMBw0eUfAImHYs60MSW6qLT894tCvNm0H6DIb
Content-type: text/plain; charset=us-ascii
Content-Disposition: inline
Good point. I was seeing the IOT as an *ordered/sorted* table. And from all of the responses, it seems to be the case. Basically, seems as if its just a table with a defined order which occurs on insert, update, or delete (like a b-tree). Only, I would think that if the table were LARGE, that there would be some perfomrance impact on arranging it this way. Aren't you basically re-indexing with each entry?
I can see using one for lookup tables only. Otherwise, I just dont see the use of it (or it may be that I have just not come across a use for it in my daily work).
Thanks,
Hannah
"Gillies, Garry" <garry_at_weir.co.uk> on 11/10/2000 09:35:35 AM
Please respond to ORACLE-L_at_fatcity.com
To: Multiple recipients of list ORACLE-L <ORACLE-L_at_fatcity.com>
cc:
Subject: RE: Index Organized tables: Please explain use?
Hi Hannah,
Think of a standard old fashioned Oracle table with an old fashioned Oracle
index.
If a select is done on the table which references only the keys of the
index,
then there is no need for a table lookup - all the data is available in the
index.
Suppose you have a query which can get all of its fields from an index
except one.
Might it be worth while to include that field in the index to save the table
lookup?
Index entries consist of key data and rowids. Would it be so difficult to
slip in some
extra, non key, data as well? Apparently not.
Carried to its illogical conclusion, you get an index which contains all of
a tables
data, or looking at it from the other side, a table structured like an
index.
This sort of structure was common on the old mainframe codasyl databases of yesteryear.
Its inclusion in a relational database is a mystery to me, since a
fundamental tenet
is that the order of data in a table is irrelevant.
Personally, I intend to avoid them as far as possible.
Regards
Garry
-----Original Message-----
Hello List!
I'm having trouble comprehending the idea of an Index Organized table.
The
Oracle 8i DBA Bible has this paragraph in it:
An index-organized table is one in which the entire table is created as
an
index. All the data is stored in the index, and there
really is no underlying table. Oracle 8i allows secondary indexes to
be
created on these tables, allows them to store large
objects, and allows you to add or modify columns using the ALTER TABLE command.
This is all they wrote. But I dont understand how/why one would store data
in
the actual index. And if you create an index, don't you need to create it
on a
specific table? And if there is NO table, then HOW could you create and
index
on it. And why would you do it even if you could?
Thanks in advance,
Hannah
++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++
--0__=0XPadVmOANmlcEdVuWCRMBw0eUfAImHYs60MSW6qLT894tCvNm0H6DIb
Content-type: text/html;
name="att1.htm"
Content-Disposition: attachment; filename="att1.htm" Content-transfer-encoding: base64 Content-Description: Internet HTML
PCFET0NUWVBFIEhUTUwgUFVCTElDICItLy9XM0MvL0RURCBIVE1MIDMuMi8vRU4iPg0KPEhUTUw+ DQo8SEVBRD4NCjxNRVRBIEhUVFAtRVFVSVY9IkNvbnRlbnQtVHlwZSIgQ09OVEVOVD0idGV4dC9o dG1sOyBjaGFyc2V0PWlzby04ODU5LTEiPg0KPE1FVEEgTkFNRT0iR2VuZXJhdG9yIiBDT05URU5U PSJNUyBFeGNoYW5nZSBTZXJ2ZXIgdmVyc2lvbiA1LjUuMjY1MS43NSI+DQo8VElUTEU+UkU6IElu ZGV4IE9yZ2FuaXplZCB0YWJsZXM6IFBsZWFzZSBleHBsYWluIHVzZT88L1RJVExFPg0KPC9IRUFE Pg0KPEJPRFk+DQoNCjxQPjxGT05UIFNJWkU9Mj5IaSBIYW5uYWgsPC9GT05UPg0KPEJSPjxGT05U IFNJWkU9Mj5UaGluayBvZiBhIHN0YW5kYXJkIG9sZCBmYXNoaW9uZWQgT3JhY2xlIHRhYmxlIHdp dGggYW4gb2xkIGZhc2hpb25lZCBPcmFjbGUgaW5kZXguPC9GT05UPg0KPEJSPjxGT05UIFNJWkU9 Mj5JZiBhIHNlbGVjdCBpcyBkb25lIG9uIHRoZSB0YWJsZSB3aGljaCByZWZlcmVuY2VzIG9ubHkg dGhlIGtleXMgb2YgdGhlIGluZGV4LDwvRk9OVD4NCjxCUj48Rk9OVCBTSVpFPTI+dGhlbiB0aGVy ZSBpcyBubyBuZWVkIGZvciBhIHRhYmxlIGxvb2t1cCAtIGFsbCB0aGUgZGF0YSBpcyBhdmFpbGFi b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