Creating an index

Use the Create Index window to create an index.

Fields and controls

Authorities and privileges



To create an index:

  1. Open the Create Indexes window.

  2. Use the Index schema list box to specify the schema for the index that you are creating.

    Attention: Do not use SYSIBM, SYSCAT, or SYSSTAT for the schema name.

  3. In the Index name field, type the name for the index that you are creating.

  4. Use the Table schema box to specify the schema for the table on which the index is to be created.

  5. In the Table name field, type the lower-order (unqualified) identifier for the table on which the index is to be created.

  6. In the Available columns list box, select the column or columns that you want to define as part of the index key.

    Click the > push button to move the selected column or columns to the Selected columns list box. The order in which the columns appear in the Selected columns list box is the order in which the index is created.

  7. Optional: Use the Include columns list box to select additional columns to be included in the index, but not as part of the unique index key. The Include columns list box is activated when you select the Unique check box.

    In the Available columns list box, select the additional columns to be included in the index. Click the > push button to move the selected column or columns to the Include columns list box. The order in which the columns appear in the Include columns list box is the order in which the index is created.

  8. Optional: Specify the order to place the index entries in by clicking on the Ascending and Descending radio buttons.

  9. Optional: Select the Unique check box to prevent the table from containing two or more rows with the same value of the index key.

    Attention: If the table contains rows with duplicate key values, the index is not created.

  10. Optional: Select the Cluster check box to specify that the index is the clustering index of the table.

    Attention: A clustering index may not be created on a table that is defined to use append mode.

  11. Optional: Select a value in the Percentage of free space to be left on index pages field to specify what percentage of each index page to leave as free space when building an index.

  12. Optional: In the Comment field, document the index that you are creating.

  13. Click OK to create the index.


Related information