I recently read about Oracle Index Organization Charts (IOT), but I'm not sure I fully understand WHEN to use them. So I have a small table:
create table categories
(
id VARCHAR2(36),
group VARCHAR2(100),
category VARCHAR2(100
)
create unique index (group, category, id) COMPRESS 2;
The column idis a foreign key from another table entries, and my general query is:
select e.id, e.time, e.title from entries e, categories c where e.id=c.id AND e.group=? AND c.category=? ORDER by e.time
The record table is correctly indexed.
Both of these tables have millions (16M currently) of rows, and currently this query really stinks (note: I wrapped it in a page request too, so I only return the first 20, but for simplicity I omitted this).
Since I basically index the entire table, does it make sense to create this table as an IOT?
EDIT by popular request:
create table entries
(
id VARCHAR2(36),
time TIMESTAMP,
group VARCHAR2(100),
title VARCHAR2(500),
....
)
create index (group, time) compress 1;
, , . , (3 ), , IOT?