Databases Reference
In-Depth Information
7.
Now, we can see the execution plan and statistics for the query on the index
organized table in the following screenshot:
8.
Drop the table:
DROP TABLE IOT_COUNTRIES;
How it works...
We have created a table with the same fields of the
COUNTRIES
table of the
SH
schema,
specifying the
ORGANIZATION INDEX
clause in the
CREATE TABLE
statement. Hence,
we have created an Index Organized Table (IOT).
After populating the index organized table with the same data as the heap table, we have
executed the same query against the two tables, collecting statistics and the execution plan.
The query is a simple lookup of the country name based on the primary key value.