Creating clustered indexes on segments

The bottom, or leaf level, of a clustered index contains the data. Therefore, a table and its clustered index are on the same segment. If you create a table on one segment and its clustered index on a different segment, the table will migrate to the segment where you created the clustered index. This provides a quick and easy way to move a table to other devices in your database.

The syntax for creating a clustered index on a segment is:

create [unique] clustered index index_name 
     on [[database.]owner.]table_name (column_name 
          [, column_name]...) 
     [with {fillfactor = x, ignore_dup_key, sorted_data,
          [ignore_dup_row | allow_dup_row]}]
     on segment_name

See “Segments and clustered indexes” for an example of this command.