The lowest level of the index is called the sequence set. It contains one pointer (compressed key) for each data component CI in a data component CA. This means the index component CI size must be at a minimum equal to the compressed key size times the number of data component CIs in a data component CA plus the overhead.
The index set is all levels of the index above the sequence set. The highest level of the index set must fit in a index component CI. So, if the total number of data component CAs is greater than the number of keys which can be held in one index component CI, the index has more than one index level. When the indexes are not in buffers, a physical read must be performed for each index level to access a data record. Without an explicit definition for the index component CI size, VSAM automatically selects a CI size based on assumptions it makes about key compression. Frequently, these assumptions over-estimate the amount of compression present. Therefore, VSAM creates an index component CI that is too small to address all data component CIs within one CA. Because the remaining data component CIs cannot be used, space is wasted. You can correct this problem by increasing the index component CI size to reduce the amount of space used by the file.
In addition to wasting space, small index component CI sizes can cause VSAM to add additional levels to the index set. The additional levels increase the number of I/Os required to locate data. LSR reduces the impact of this problem by keeping index component CIs in storage. However, LSR processing is not appropriate for certain applications, specifically SHAREOPTIONS=4 and sequential processing. In these cases, the number of physical I/Os required to locate your data can have a great impact on performance. As a rule of thumb, files should have no more than one index level per 500 cylinders of data, plus one each for the base index and sequence set. VPE issues a message informing you how many index levels the file has when this is exceeded.
When in doubt, it is better to have an index component CI that is too large than one that is too small. For most files, index space is a small fraction of data space. If the index component CI is too large, little space is wasted. If it is too small, major overhead is added to the file access and a significant amount of data space can be wasted.
The factors to be considered when selecting an index component CI size are:
Because an assessment of actual key compression is not possible without scanning the full sequence set and the penalty for undersized index component CIs is large, VPE issues a warning when the index component CI size specified is less than a factor of the number of CIs per CA multiplied by the full key length. VPE uses factors similar to those internal to VSAM, but more conservative. If you receive this message, go to the next higher CI size or use IDCAMS to examine the indexes to determine if any are actually full. If the index change has a positive effect, increase it again until no further change takes place. If it has no effect, ignore any further occurrences of this message. Remember there are NO circumstances under which having an index component CI one size too large causes any performance degradation.
| Copyright © 2012 CA. All rights reserved. |
|