Analyzing primary keys

Use the Primary Key Index Analysis window to view which tables in the delete service have an index on the primary key. A table with a key lookup limit must have an index on the primary key. If a table with a primary key does not have an index, you can use the window to create an index for the table.

The window will display the following statuses for tables in the delete service:

Table
The name of the table in the delete service.
Status
The status of the index for the listed tables. The status displays the following values:
DBPK
An index on the database primary key is defined for the table and is used to access the table.
Unique
A unique index on an Optim™ primary key is defined for the table. The primary key columns may be indexed in any order.
Full
An index on an Optim primary key is defined for the table. The index includes all primary key columns at the beginning of the index, in any order, but can include additional columns.
Partial
An index on an Optim primary key is defined for the table. The index includes at least one primary key column at the beginning of the index, but can include additional columns.
None
No index exists with the necessary columns.
Indeterminate
Optim attempted to create DBMS indexes.
No PK
No primary key is defined for the table.
Table Not Found
The DB Alias referencing the database tables does not exist in the current Optim directory.

You can create an index for tables with a status of Partial or None only.

  1. Open the delete strategy options, depending on the service type:
    Delete service
    1. Expand a folder in the Directory Explorer that contains the delete service, expand the Delete Services node, and double-click the delete service to edit.
    2. Select the Strategy tab.
    Archive service
    1. Expand a folder in the Directory Explorer that contains the archive service, expand the Archive Services node, and double-click the archive delete to edit.
    2. Select the Delete tab.
    3. Ensure that Defer delete after archive is not selected.
    4. Click Delete Strategy to open the Table Delete Strategy window.
  2. Open the Primary Key Index Analysis window by clicking Primary Key Index Analysis or right-clicking a row in the table list and clicking Primary key index analysis for all tables.

    To analyze the index of a single table in the list, right-click the row that contains the table and click Primary key index analysis for this table.

  3. If the table has a status of Partial or None, you can create an index.
    Creating an index for a table
    Select the row that contains the table and click Create Index, or right-click the row that contains the table and click Create Index
    Creating an index for all tables
    Click Create All Indexes, or right-click a row and click Create All Indexes.
  4. Save the delete service.


Feedback