MTI TEK
  • Home
  • About
  • LLMs
  • Docker
  • Kubernetes
  • Java
  • All Resources
Oracle SQL | Index-Organized Tables (IOT)
  1. Creating Index-Organized Tables using ORGANIZATION INDEX

  1. Creating Index-Organized Tables using ORGANIZATION INDEX
    The data inserted into this table will have the same structure as an index.

    This structure imposes a physical order on the rows of the table; the rows will be sorted based on the primary key.

    The purpose of using an IOT is to save disk space, since the table itself is an index (there's no need to create a separate index), and consequently, to improve query performance.

    Not all tables are suitable candidates to be IOTs. One example is a lookup table that contains an ID column and a CODE column, and that is not frequently updated.
    CREATE TABLE table_iot
    (
        pkid NUMBER(1,0) NOT NULL
    ,   code VARCHAR2(2) NOT NULL
    ,   CONSTRAINT pk_table_iot_pkid PRIMARY KEY (pkid)
    ) ORGANIZATION INDEX;
    
© 2025 mtitek