Optimizing Your Compaq COBOL Program
15.7 Optimizing File Design (OpenVMS)
Continue calculating index depth until you reach the root level—that is, when the
number of buckets needed to address the buckets from the previous level equals
1.
Level 2 (index buckets):
Level 3 (index buckets):
15.7.3.2 Calculating Key Index Levels
If you allow duplicate keys in alternate indexes, the number and size of SIDRs
depend on the number of duplicate key values in the file. (For duplicate key
alternate index calculations, see the OpenVMS Record Management Services
Reference Manual.) Because alternate index records are usually inserted in
random order, the bucket packing efficiency ranges from about .5 to about .65.
The following example uses an average efficiency of .55.
In each of the following calculations, the results are either rounded up or
truncated.
Level 0 (data level buckets—no duplicate alternate keys):
Level 1 (index buckets):
Level 2 (index buckets):
15–24 Optimizing Your Compaq COBOL Program