Avatar of sakthikumar
sakthikumar

asked on 

What are IOT indexes and what are all the disadvantages for this?

What are IOT indexes and what are all the disadvantages for this?
Oracle Database

Avatar of undefined
Last Comment
mrjoltcola
Avatar of mrjoltcola
mrjoltcola
Flag of United States of America image

IOT are Tables organized as Indexes

The advantage is it lets you organize a table in the order most commonly accessed, and lets you combine storage for a heap table + primary key.

A typical heap table in Oracle has no ordering. Then you create a primary key index which is stored in a 2nd segment. So you have to segments of data now. Also you have redundant storage of the indexed columns. So when querying by the primary key, Oracle has to first access the index, then the table in most cases.

An IOT gets rid of the redundancy, and also orders the rows in the actual table, because it is an index, with the additional difference that the IOT also has the full data for each row stored in it, not just the keys.
Avatar of mrjoltcola
mrjoltcola
Flag of United States of America image

The disadvantage would be only in the case of access of the IOT by a key other than the primary key, that requires a secondary index, but the difference is, on an IOT, secondary indexes use logical rowids, not physical, so there is an extra layer of abstraction when accessing the rows.

There are some other minor constraints as well, in the docs, but most are special case issues.

In general, IOTs work very well for tables where most of the access is either unsorted scans, scans sorted by key, or random access by primary key.
Avatar of ajexpert
ajexpert
Flag of United States of America image

I raised similar question few months ago, it might help you

https://www.experts-exchange.com/questions/26636850/INDEX-and-INDEX-ORGANIZED-TABLE.html

Avatar of CaliAli
CaliAli

You can always create a table, then an index of all its columns.  This way it is easier to drop and rebuild indexes if you need to.
ASKER CERTIFIED SOLUTION
Avatar of mrjoltcola
mrjoltcola
Flag of United States of America image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Oracle Database
Oracle Database

Oracle is an object-relational database management system. It supports a large number of languages and application development frameworks. Its primary languages are SQL, PL/SQL and Java, but it also includes support for C and C++. Oracle also has its own enterprise modules and application server software.

81K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo