Maintaining Indexes

Problem

You want to create a new index for a table, or to modify or delete an existing index.

Solution

Use the Indexes tab on the properties window for the table to perform the following tasks:

Tasks

Create a New Index

Perform the following steps to create a new index in the Indexes tab:
  1. Click New. A folder displays in the tree in the Indexes field. This folder represents an index and has an appropriate default name. The name is selected for editing. You can rename the index to a more appropriate value by typing over the existing name and pressing the Enter key.
  2. Drag a column name from the Columns field to an index folder in the Indexes field to add one or more columns to the index.
  3. Click OK. The following display depicts a sample index.
    Sample Completed Index
    Sample Completed Index
Note: If you add one column to the index, you create a simple index. If you add two or more columns, you create a composite index. If you want the index to be unique, select the index name in the Indexes field, and then select the Unique values check box. Finally, if you are working with a SAS table and want to ensure that the index contains no missing values, check the No missing values check box.

Delete an Index or a Column

Perform the following steps to delete an index or to delete a column from an index in the Indexes window or tab:
  1. Select the index or column in the tree in the Indexes field.
  2. Click the Delete button, or press the Delete key on your keyboard.
  3. Click OK.

Rearrange the Columns in an Index

You can reorder the columns for composite indexes, which contain more than one column. Perform the following steps to move a column up or down in the list of index columns in the Indexes window or the Indexes tab:
  1. Select the column that you want to move in the tree in the Indexes field.
  2. Use the Move columns up in an index and Move columns down in an index buttons to move the column up or down.
  3. After you have arranged the columns as you want them, click OK.
Note: It is generally best to list the column that you plan to search the most often first.
Last updated: January 16, 2018