Defining the partitions of the PSINDEX database to DBRC
HALDB partition definitions for the PSINDEX are stored in DBRC RECON data sets.
- The pointers in PSINDEX records are different. Each PSINDEX record includes the 28-byte extended pointer set (EPS). Non-HALDB secondary index records have either a 4-byte direct pointer or a symbolic pointer. Symbolic pointers are the length of the concatenated key.
- The root keys of the target segments are stored in the PSINDEX records. Non-HALDB secondary index records do not store the root keys. When allocating your HALDB secondary index partitions, you must account for this increased size.
The total size of the secondary index is usually easy to estimate. All secondary index entries are fixed length. The DBDGEN utility reports this length. The total length is indicated by the RECORDSIZE under RECOMMENDED VSAM DEFINE CLUSTER PARAMETERS in the output of the DBDGEN utility for the HALDB database. The number of entries does not change during the conversion. You can determine the current number of entries from the output of several utilities. When you re-create a secondary index as part of a reorganization process, the HISAM Reload utility or any tool that you use reports this information.
Alternatively,
you can use the REC-TOTAL value from the z/OS® LISTCAT
command to find
the number of records in the existing secondary index data set.
Finally, you can use the HALDB Migration Aid utility to find the number of records. You can use the number of records, their length, and free space requirements to estimate the size of an entire HALDB secondary index. For example, if you had 1 000 000 entries, a record length of 48 bytes, and wanted an additional 25% for free space, the index would require 60 000 000 bytes.
The size requirements of each partition depend on the number of index entries in the partition. You can estimate this from the output of the HALDB Migration Aid utility (DFSMAID0) or by other means. If you already know the number of secondary index entries in a key range, you do not need to use the Migration Aid utility. Otherwise, you should use the utility.
The HALDB Migration Aid utility provides accurate information about the number of records in a key range and key range boundaries. It does not provide accurate information about the number of bytes that are required for a segment or partition. For this reason, you should not use the MAX control statement when reading a secondary index. If you know the number of partitions that you want, use the NBR control statement. If you know the high keys that you want, use KR control statements. When an NBR statement is used, the high keys that are reported for each partition are accurate. When you use KR control statements, the number of segments reported for each partition is accurate.
The following example output shows some of the output of the HALDB Migration Aid utility for a secondary index. This output was generated with a NBR=4 control statement. The reports for partitions 1, 2, and 3 are omitted here. Only the report for partition 4 and the total database are shown. The numbers of segments that are reported in the segments column are correct. Partition 4 will contain 158518 secondary index segments, and the entire index will contain 634078 segments. The information in the bytes and prefix-incr columns is incorrect, as it is for all such reports for secondary indexes. Nevertheless, you need only the number of segments in a partition to calculate its space requirements.
partition 4 :
minimum key =
+0000 f0f0f1f6 f0f8f1f1 f5f0f0f0 f0f0f1f3 |0016081150000013|
+0010 f1f7 |17 |
maximum key =
+0000 f0f0f2f1 f1f0f3f0 f0f0f0f0 f0f0f0f5 |0021103000000005|
+0010 f4f6 |46 |
segments bytes prefix-incr length-incr
1) 'ORDRCUST' 158518 3804432 1268144 0
SUM) 158518 3804432 1268144 0
--------------------------------------------------------------------------------
sum of partitions:
segments bytes prefix-incr length-incr
1) 'ORDRCUST' 634078 15217872 5072624 0
SUM) 634078 15217872 5072624 0
-------------------------------------------------------------------------------
You can use the record size that is reported by the DBDGEN utility and the number of segments for a partition to estimate the size requirement for the partition. If necessary, you can add free space and room for expansion of the partition.