![]() |
![]() HP OpenVMS Systemsask the wizard |
![]() |
The Question is: What are the differences in "prolog level" and what are the resulting good and bad points of each? The Answer is : An extensive discussion of the indexed file prolog levels -- as well as other relevent performance and tuning information -- is present in the _Guide to OpenVMS File Applications_ manual, part of the OpenVMS documentation set. For questions related to this one, the Wizard strongly recommends acquiring and reading this manual. Attached are some relevent extracts from this manual: "RMS places information concerning file attributes, key descriptors, and area descriptors in the prolog. You can examine the prolog with the Analyze/RMS_File utility. There are three types of prologs: Prolog 1, Prolog 2, and Prolog 3. Prolog 1 and Prolog 2 Files Any indexed file created with a version of the operating system lower than Version 3.0 is either a Prolog 1 file or a Prolog 2 file. Prolog 1 files and Prolog 2 files operate identically. If an indexed file uses only string data-type keys, the file is a Prolog 1 file. The string data-type keys include STRING, DSTRING, COLLATED, and DCOLLATED keys. If an indexed file uses numeric type keys, it is a Prolog 2 file. You cannot use the Convert/Reclaim utility on a Prolog 1 file or a Prolog 2 file to reclaim empty buckets. If your file undergoes a large number of deletions (resulting in empty, unusable buckets), you must use the Convert utility (CONVERT) to reorganize the file. (Note that CONVERT establishes new RFAs for the records.) The compression allowed with Prolog 3 files is not possible with Prolog 1 or Prolog 2 files. Prolog 3 Files Prolog 3 files can accept multiple (or alternate) keys and all data types (including the nonstring 8-byte BIN8 and INT8 types). They also give you the option of saving space by compressing your data, indexes, and keys. Key compression compresses the key values in the data buckets. Likewise, index compression compresses the key values in index buckets, and data compression compresses the data portion of the records in the data buckets. Key or index compression is restricted to the string key data type and the string must be at least 6 bytes in length. You cannot use key compression or index compression with any numeric or collated key data types. With key or index compression, repeating leading and trailing characters are compressed. With front key compression, any characters that are identical to the characters at the front of the previous key are compressed. For example, the keys JOHN, JOHNS, JOHNSON, and JONES appear as JOHN, S, ON, and NES. With rear key compression, any repeating characters at the end of the key are compressed to a single character. For instance, the key JOHNSON00000 appears as JOHNSON0. Enabling index compression results in RMS doing a sequential search in index buckets rather than its default binary search, since each index key value must be expanded until a match is found. With data compression, RMS can compress sequences of up to 255 repeating characters in the data portion of the user data records. For optimal performance, RMS does not compress sequences having less than five repeating characters. Compression has a direct effect on CPU time and disk space. Compression increases CPU time, but the keys are smaller, so your application can scan more quickly through the data and index buckets. The disk space saved by using Prolog 3 indexed files can significantly improve performance. With compression, each I/O buffer can hold more information to improve buffer space efficiency. Compression can also decrease the number of index levels, which decreases the number of I/O operations per random access. Prolog 3 files can have segmented primary keys, but the segments cannot overlap. If you want to use a Prolog 3 file in this case, consider defining the overlapping segmented key as an alternate key and choosing a different key to be the primary key. If you want to use overlapping primary key segments, you must use a Prolog 2 file. If record deletions result in empty buckets in Prolog 3 files, you can use the Convert/Reclaim utility to make the buckets usable again. Because CONVERT/RECLAIM does not create a new file, RFAs remain the same. Note that RMS-11 does not support Prolog 3 files. To use a Prolog 3 file with RMS-11 you must first use the Convert utility to transform the file into a Prolog 1 file or into a Prolog 2 file. For Prolog 3 files, the maximum record size is 32,224 bytes. For Prolog 1 files and Prolog 2 files, the maximum length for a fixed-length record is 32,234 bytes; the maximum length for a variable-length record is 32,232 bytes. Note that when you specify a record length for a Prolog 3 file that is greater than the maximum record length, RMS automatically converts the file to a Prolog 1 or Prolog 2 file."
|