Define a Db2 LUW Index
A primary key (PK) and a foreign key (IF) index is automatically created for each table in your model, based on the primary key and foreign key columns. If you designate columns as an alternate key group (AK) or an inversion entry (IE), the equivalent unique (AK) and non-unique (IE) indexes are also generated.
Use the Db2 for LUW Table Index Editor to create alternate key (unique) and inversion entry (non-unique) indexes for tables in your model. After you create an index, you can use the Index editor to modify its properties, such as the index name, column members, physical properties, user-defined properties, and comments.
To define a Db2 LUW Index
- Right-click a table index in the Model Explorer and click Properties.
The Db2 for LUW Table Index Editor opens.
- Select an index and work with the following options:
Click New
on the toolbar to create a index. Use the Enter filter text text box to filter a large list of indexes to locate the one you want to work with.
- Show FK Indexes
Specifies whether or not to display foreign key indexes in the Index list.
- Physical Name
Specifies the name of the index.
- Schema
Specifies the default schema for the index.
- Type
Shows the key group type. This is a read-only field.
- Is Unique
Specifies whether or not the columns defined in the index must be unique.
- Physical Only
Specifies whether or not the index should be suppressed from a logical model and appear in a physical model only.
- Generate
Specifies whether or not to generate DDL for this object during Forward Engineering.
- Generate As Constraint
Specifies whether or not to generate a constraint based on the information in the selected index during Forward Engineering.
- On the Members tab, select the columns from the table that you want to include in the index. In the Include Column section, select any additional columns that you want to include in the index.
You can sort the columns and open the Db2 for LUW Table Column Editor.
- Work with the following fields on the General tab:
- Constraint Name
Specifies the constraint associated with the index.
- Clustered
Specifies that the index is the clustering index of the table.
- Tablespace
Specifies the tablespace name in which to create the index.
- Percent Free
Specifies the percentage of each index page to leave as free space when building the index.
- Level 2 Percent Free
Specifies the percentage of each index level 2 page to leave as free space when building the index.
- Minimum Percent Used
Specifies whether index leaf pages are merged online, and the threshold for the minimum percentage of space used on an index leaf page.
- Allow Index Reverse Scan
Specifies that an index can support both forward and reverse scans; that is, scanning of the index in the order that was defined at index creation time, and scanning in the opposite order.
- Page Split Type
Specifies the index split behavior. Select from the drop-down list. The valid values are symmetric, high, and low.
- Collect Statistics Type
Specifies that the index statistics have to be collected at the time of creating the index. Select from the drop-down list. The valid values are Basic, Detailed, Detailed by Sampling, and Detailed by UnSampling.
- Is Compressed
Specifies that the index will use index compression. Select from the drop-down list; valid values are True and False.
- Is Partitioned
Specifies that a partitioned index should be created.
- Business Time Without Overlaps
- Specifies whether the end column and begin column of the period BUSINESS_TIME are automatically added to the index key in ascending order and enforce that there are no overlaps in time. You can specify this option only for an index that is defined as UNIQUE.
- NULL Keys
- Specify whether an index entry is created or not when all parts of the index key contain a null value.
- Is Enforced
Specifies whether validation is enforced on the selected index
- Is Trusted
Specifies whether the data can be trusted to conform to check constraints.
- Click the Extend Using tab and work with the following options:
- Index Extension
Specifies the name of the index-extension used to manage this index.
- Expressions
Specifies values for any required arguments for the index extension. Each expression must be a constant value with a data type that exactly matches the defined data type of the corresponding index extension parameters, including length or precision, and scale.
- Click the Permission tab and grant permissions to users or roles on the selected index.
- (Optional) Click the Commenttab and enter any comments that you want to associate with the object.
- (Optional) Click the Where Used tab to view where the object is used within the model.
- (Optional) Click the UDPtab to work with user-defined properties for the object.
- (Optional) Click the Notestab to view and edit user notes.
- (Optional) Click the Extended Notes tab to view or edit user notes.
- Click Close.
The changes are saved and the Db2 for LUW Table Index Editor closes.
Copyright © 2025 Quest Software, Inc. |