An index organized table keeps its data sorted according to the primary key column values for the table. An Index- organized table stores entire data inthe table was stored in an index
Index’s serve two main-purposes
- To enforce uniqueness, when a primary key or unique constraint is created, oracle created an index to enforce the uniqueness of the indexed columns
- To improve performance when a query can use an index, the performance of the query may dramatically improve.
Example1:
create table state_lookup_iot (
area_code number(3)
state_name varchar2(100),
city_name varchar2(100),
primary key (area_code)
)
organization index
tablespace users;
Example2:
create table customers
(
trans_id varchar2(10),
country varchar2(10),
year varchar2(10),
constraint trans_id_pk PRIMARY KEY (trans_id)
)
organization index;