Show TOC

 Creating Secondary IndexesLocate this document in the navigation structure

Procedure
  1. On the maintenance screen of the table, choose Indexes.

    If indexes already exist on the table, a list of these indexes is displayed.

  2. Choose  with the quick info text Create.
  3. From the dropdown menu, choose Create Index.
  4. In the next dialog box, enter the index ID and choose  with the quick info text Continue.

    The maintenance screen for indexes appears.

  5. Enter an explanatory text in the Short description field.

    You can use the short description to find the index at a later time, for example using the Information System.

  6. To select the table fields to be inserted in the index, choose Table Fields.

    A list of all the available table fields appears.

  7. Select the desired fields using the indicator in the first column and then choose Copy.
    Caution

    The order of the fields in the index is important. For more information, see Special Features of Secondary Indexes

  8. If the values in the index fields already uniquely identify each record of the table, select the Unique index radio button.

    The system always creates a unique index in the database at activation because it also has a functional meaning (prevents double entries of the index fields).

  9. If it is not a unique index, leave the Non-unique index radio button selected.

    In this case, you can use the radio buttons under Non-unique index to define whether the index must be created for all database systems, for selected database systems, or not at all in the database.

    1. If the index must be created only for selected database systems, select For selected database systems.
    2. Choose  with the quick info text Database Systems.

      A dialog box appears in which you can define up to four database systems with the input help. Select Selection list if the index must be created only on the given database systems. Select Exclusion list if the index must not be created on the given database systems.

    3. Choose  with the quick info text Continue.
  10. Choose  with the quick info text Save.
  11. Choose  with the quick info text Activate.
Result

The secondary index is automatically created on the database during activation, if the corresponding table has already been created there and the index creation was not excluded for the database system.

You can find information about the activation flow in the activation log. To call the activation log choose Utilities → Activation log. If errors occur when activating the index, the activation log is automatically displayed.

See also:

Indexes