Displaying and editing the index definition


The CR row command also creates a new index with attributes acquired from a similar index. This section shows you how to display a list of related indexes using the IX row command on a table, then use the CR command on a related index to create the new index. Your screen must look like Completed Table Editing Windows. File-AID for Db2 Object Administration automatically generates the SQL based on the data currently showing in the definition windows before you continue.

Index Display. This window is maximized.

image2021-5-10_12-57-50.png

Perform the following steps to display and edit the index definition:

  1. Execute the IX (related indexes) row command next to EMPTEST.

    This row command displays indexes related to the originally selected EMP table (Index Display. This window is maximized). The example has two indexes: XEMP1 and XEMP2.

  2. Execute the CR row command next to XEMP1.

    The following index editing windows open (see the following figure):

    • Edit Create Index Information
    • Model Index Partitions
    • Index Partitions which differ from model
    • Index Columns.

    These windows display index attributes acquired from the existing index XEMP1.
    Index Editing Windows
    image2021-5-10_13-0-28.png

  3. Make the following changes in the Edit Index Information window:
    1. Change the number of partitions by entering 8 in the PART field
    2. Type XEMPTEST over XEMP1 to change the index name.
    3. Type EMPTEST over EMP in the TBNAME field to change the table name.
    4. Type your user ID in the IXCREATOR field.
    5. Type your user ID in the TBCREATOR field.
  4. Make the following changes in the Model Index Partition window:

    1. Change the primary quantity to 20 in the PRIQTY field
    2. Change the secondary quantity to 5 in the SECQTY field

    This will create 8 equally sized index partitions.

    Your screen should now look similar to the following figure.
    Completed Index Editing Windows

    image2021-5-10_13-2-49.png

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*