Creating Standard, Key, or Function-Based Indexes

You can create indexes by selecting columns on a table property sheet Columns tab and clicking the Create Index tool.

  1. Open the property sheet of a table and select the Columns tab.
  2. Select the column or columns on which to base the index and click the Create Index tool.
    The index is created and its property sheet opens.
  3. Enter a name for the index and then click the Columns tab.
  4. PowerDesigner supports the creation of the following types of index:
    • Standard indexes are associated with one or more columns containing high-cardinality values that are frequently searched on. Use the arrow buttons at the bottom of the list to reorder the columns in order of descending cardinality.
    • Key indexes are associated with a primary, foreign, or alternate key and based on the same columns as the key. Select the appropriate key from the Columns definition field above the list to empty the list and replace it with the columns associated with the key.
      Note: Key indexes are conventionally named after the table with a _PK, _FK, or AK suffix (for example, Project_AK).
    • Function-based indexes [if supported by the DBMS] are populated with values derived from a function or expression based on one or more columns, and provide an efficient mechanism for evaluating statements that contain functions in their WHERE clauses. Click the Add a Row tool, then click in the Expression column and click the ellipsis button to open the SQL Editor to specify an expression.
  5. Select an ascending or descending sort order for each column using the list's Sort column.
  6. Click OK to complete the creation of your index and return to the table property sheet.
    Note: You can alternatively create an index using the Add a Row tool on the table property sheet Indexes tab, click the Properties tool to open its property sheet, and select the Columns tab to manually associate columns with the index.