Indexes (PDM)

An index is a data structure associated with one or more columns ordered by the column values and used to improve read access times. You normally create indexes for columns that you search on regularly, and where response time is important. Most types of index are more effective when applied to columns with high cardinality.

You can create the following types of index: For example, in an Author table, you might create an index for the primary key Author ID and another for the Author name column, as it is regularly searched on. You will not create an index for the Author Home City column, as it is not often searched on.

Reverse Engineering Function-based Index

Index columns with expressions have a LONG data type that cannot be concatenated in a string statement during reverse engineering. The only way to bypass this limitation and concatenate this value is to use variables in the query executed to retrieve the adequate information.

In the Oracle 8i and Oracle 8i2 DBMS, the query SqlListQuery defined in the Index category contains the following variable used to recover the index expression in a column with the LONG data type.

'%SqlExpression.Xpr'||i.table_name||i.index_name||c.column_position||'%'

For more information on the use of variables in reverse engineering queries, see Customizing and Extending PowerDesigner > DBMS Definition Files.