ISAM index density

Three forms of index density occur during file updates:

Natural fill is enabled by default (in other words, if you don’t specify the file or key density options). Balanced and context fill are enabled for all keys when the file density option is specified, or for the specified keys when the key density option is specified. Routine file updates (STORE, WRITE, and DELETE) use the defined density form and pack indexes accordingly. In addition, the isutl utility (-rp option) can be used to pack indexes to a desired density without changing the defined density option.

Keys stored randomly using natural fill will typically fill to about 68 percent, while keys stored sequentially will fill to 50 percent. Keys stored randomly using balanced fill will typically fill to about 73 percent (when defined density is 80 or higher), while keys stored sequentially will fill to the defined density.

We believe natural fill is best for files that regularly have large volumes of file updates, and it should be followed up by running isutl at regular intervals to optimize the indexes. For files that normally have few updates, like window libraries, archives, and other read-only files, use the natural fill and then use the isutl -rp option to pack the indices to 100 percent. This will reduce the size of the file by compacting the indexes and improving read performance.

Keys that represent a sequence number or any continually increasing value that grows sequentially (such as a key based on time) where insertions to the middle of the sequence are rare may be candidates for context fill at 100 percent density. If these keys allow duplicates, make sure the duplicates are inserted at the end. The STORE operations will maintain the index density at 100 percent. Keys of this nature take up half the space normally taken by keys with no specified density.

File creation density options