24.12.2012 Views

ER/Studio - Embarcadero Technologies Product Documentation

ER/Studio - Embarcadero Technologies Product Documentation

ER/Studio - Embarcadero Technologies Product Documentation

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

USING <strong>ER</strong>/STUDIO > DEVELOPING THE PHYSICAL MODEL<br />

• Where Not Null: (WH<strong>ER</strong>E_NOT_NULL) If selected, specifies that multiple nulls can exist in a unique index. Useful<br />

when an index contains at least one nillable column, but all non-null entries must be unique.<br />

• Cluster: If selected, specifies to create a clustered index. A clustered index specifies that the rows of the table<br />

should be inserted sequentially on data pages, which generally requires less disk I/O to retrieve the data.<br />

Generally, the clustered index should be on a column that monotonically increases, such as an identity column,<br />

or some other column where the value is increasing, and is unique. This is especially true if the table is subject to<br />

many INS<strong>ER</strong>TS, UPDATES, and DELETES. Clustered indexes can greatly increase access speed, but usually only<br />

where the data is accessed sequentially in the same or reverse order of the clustered index, or when a range of<br />

items are selected.<br />

• Percent Free: (PCTFREE) Specifies the maximum percentage of space in each data block to reserve for future<br />

updates. This reserved space helps to avoid row migration and chaining caused by an update operation that<br />

extends a data row's length. Tables that won’t be updated should have this value set to 0.<br />

• Min Percent Used: (MINPCTUSED) Specifies the minimum amount of used space on an index leaf page. If used,<br />

online index defragmentation is enabled for this index.<br />

• Allow Reverse Scans: Specifies that the index be created in a way so that scans can also be performed in the<br />

direction opposite to that with which they were defined.<br />

• Include: Specifies additional columns to be appended to the set of index key columns. The included columns<br />

may improve the performance of some queries through index-only access.<br />

IBM DB2 for OS/390 Index Options<br />

• Unique: (UNIQUE) If selected, specifies that the index key contains no duplicate values and therefore every row<br />

in the table is in some way unique. If not selected, a non-unique index is created that lets table rows have<br />

duplicate values in the columns that define the index.<br />

• Cluster: (CLUST<strong>ER</strong>) Select to create a clustered index. A clustered index specifies that the rows of the table<br />

should be inserted sequentially on data pages, which generally requires less disk I/O to retrieve the data.<br />

Generally, the clustered index should be on a column that monotonically increases--such as an identity column,<br />

or some other column where the value is increasing--and is unique. This is especially true if the table is subject to<br />

many INS<strong>ER</strong>TS, UPDATES, and DELETES. Clustered indexes can greatly increase access speed, but usually only<br />

where the data is accessed sequentially in the same or reverse order of the clustered index, or when a range of<br />

items are selected.<br />

NOTE: For IBM DB2 for OS/390 5.x, the Cluster option must be selected to enable the index partitioning<br />

options on the Partitions tab of the Index Editor. For more information, see Partitioning a Table<br />

Index.<br />

• Where Not Null: (WH<strong>ER</strong>E NOT NULL) Specifies that multiple nulls can exist in a unique index. Useful when an<br />

index contains at least one nillable column, but all non-null entries must be unique.<br />

• Concurrent Copy: (COPY) If selected, concurrent copies of the index are allowed, which can increase index<br />

availability by supporting index recovery.<br />

• Do Not Close Dataset: (CLOSE) If selected, the index will not be closed when not in use. If not selected, the<br />

dataset can be closed if it is not in use and the maximum number of open datasets is reached or exceeded.<br />

• Defer Index Creation: (DEF<strong>ER</strong>) Specifies that index modifications are to be deferred during INS<strong>ER</strong>T, UPDATE,<br />

and DELETE operations. This allows the data updates to complete quicker, but queries may not return the most<br />

up-to-date information until the index is synchronized. This option is not supported for an index on a declared<br />

temporary or auxiliary table.<br />

• Padded: (PADDED) If selected, the index entry is padded to the full length of its datatype which makes scanning<br />

the index efficient if most of the index entries are close to or at the maximum length. If not selected, the index<br />

supports true variable length key which allows for shorter indexes and more index entries on each page. It also<br />

allows index-only access. If the index is not padded, data can be retrieved directly from the index without having<br />

to look up the data length in the data page. Not padding the index can be more efficient if you’ll save a lot of disk<br />

space by not padding them.<br />

EMBARCAD<strong>ER</strong>O TECHNOLOGIES > <strong>ER</strong>/STUDIO® 8.0.3 US<strong>ER</strong> GUIDE 170

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!