User guide

Improving Performance
Using ENFORM Efficiently
5–6 058058 Tandem Computers Incorporated
Remove Levels of Indexing in Key-Sequenced Files
Reducing levels of indexing in key-sequenced files decreases the number of disc input-
output (i/o) operations needed. Note that any alternate key file is a key-sequenced
file.
To remove levels of indexing, increase the index block size (allowing enough slack for
anticipated growth) and reload the data. Increasing the index block size might reduce
the number of index levels and therefore, both reduce the number of physical accesses
to the disc and improve response time.
Key-sequenced files with small block sizes usually have more levels of index blocks
because small blocks fill faster than large blocks. In particular, key-sequenced files
created by the FUP output of the Data Definition Language (DDL) have small blocks
because they use the 1024-byte block size provided by DDL. Consider Figure 5-3
which shows a diagram of a key-sequenced file with a 1024-byte block size.
Figure 5-3. Diagram of Key-Sequenced File with 1024-Byte Block Size
Alternate Key File
Level 1 Index Block
Alternate Key File
Level 2 Index Blocks
Alternate Key File
Data Blocks
Data File
Level 1 Index Block
Data File
Level 2 Index Blocks
Data File
Level 3 Index Blocks
Data File
Data Blocks
In Figure 5-3, the alternate key file has two levels of index blocks plus the data block.
The data file has three levels of index blocks plus the data block. When using the
alternate key search path to retrieve a record from this file, the query processor must
access seven blocks: three alternate key blocks and four data file blocks. Even if the
query processor has accessed the files recently so that both level 1 index blocks are in
cache, it must still access five blocks: a level 2 alternate key file index block, an
alternate key file data block, a level 2 and a level 3 data file index block, and a data file
data block.