Use the CLUSTER keyword to reorder the rows of the table in the order that the index designates. The CREATE CLUSTER INDEX statement fails if a CLUSTER index already exists on the same table.
CREATE CLUSTER INDEX c_clust_ix ON customer (zipcode)
This statement creates an index on the customer table and physically orders the rows according to their postal code values, in (by default) ascending order.
If the CLUSTER option is specified in addition to fragments on, the data values are clustered only within each fragment, and not globally across the entire table.
In Dynamic Server, you cannot specify the CLUSTER option and the ONLINE keyword in the same statement. In addition, some secondary-access methods (such as R-tree) do not support clustering. Before you specify CLUSTER for your index, be sure that the index uses an access method that supports clustering.
If you are using Extended Parallel Server, you cannot use the CLUSTER option on STANDARD tables. In addition, you cannot specify the CLUSTER option and storage options in the same CREATE INDEX statement (see Storage Options). When you create a clustered index, the constrid of any unique or referential constraints on the associated table changes. The constrid is stored in the sysconstraints system catalog table.
Enterprise Edition Home | Express Edition Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]