Create an index for a partitioned table
- In the System i Navigator window, expand the system you want to use.
- Expand Databases.
- Expand the database and schema that you want to work with.
- Right-click the Indexes container and select New, then Index.
- In the Index name field, specify a name for the new index.
- In the Index schema field, select the schema where the index will reside.
- In the Table name field, select the partitioned table that you want to create an index for.
To select a table from a different schema, change the schema name in the
Table schema field.
- Specify how to index the partitioned table in the Partitions field. You can create the index For all partitions or For each partition.
- Select which columns of the table will make up the index. To add a column, click on it and a
number appears on the left. The number determines the key position of the column in the index. You can change the
order of the columns by selecting it and clicking
Move up or Move down. To
remove a column from the index, select it and click Remove.
- To change the order of a key column from ascending sequence to descending sequence
(or descending to ascending sequence), select the column and click Set Ascending or
Set Descending.
- Select an Index type. See Index type for details.
- Select the Number of distinct values if you are creating an encoded vector index. See
Number of distinct values for details.
- Click OK.
- Specify a description in the Text field (optional).