Creating an index on the DB2 Server for VSE & VM

Use the Create Index window to create an index for the DB2 Server for VSE & VM.

Fields and controls

Authorities and privileges



To create an index on the DB2 Server for VSE & VM:

  1. Open the Create Indexes window.
  2. In the Index name field, type the name for the index that you are creating.
  3. In the Table namefield, click the down arrow to display a list of existing tables and select one.
  4. 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.

  5. 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.

  6. Optional: Specify the order to place the index entries in by clicking on the Ascending and Descending radio buttons.
  7. 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.

  8. 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.
  9. Click OK to create the index.


Related information