Page size

You can control the size of each index page or block for each key in the index file by specifying a file page size of 512, 1024, 2048, 4096, 8192, 16384, or 32768 in the ISAMC routine. The default page size is 4096 for Revision 6 ISAM files. (For Revision 4 files, the default is 1024.) In addition to considering the operating system, the size of the largest key should also determine what page size should be used. This enables more keys to fit in a single block, thus reducing the overall depth of the key’s index. Keyed access is faster with a smaller depth, and the file is smaller due to less index at the top. Also, very large files benefit most from increased page size, though large page sizes may increase disk read time, reading data that is not needed. Increasing the page size above 4096 when the depth is at 2 or 3 will probably harm, not improve, performance. For optimal keyed READ performance, try to keep the index depth around 3 or  4, even though the CPU time required to search the larger index is increased. In most cases, the tradeoff is worth it, because CPU is faster than I/O.

When creating a file with a page size of 512 (PAGE=512), the maximum internal key size allowed is 100 bytes. The internal key size is the specified key size plus 3 if the key allows duplicates (4 for terabyte files). All keys defined for this file are limited to this maximum.

Tip

With page sizes larger than 1024, consider defining a higher index packing density. (See ISAM index density for more information.) Maximum gain from larger page sizes can only be achieved in conjunction with higher blocking factors. Ipar reports the current depth of a file, and isutl -v reports the actual density.