Previous Topic: DEFRAG (Defragment Index)Next Topic: Processing


Overview

CA Datacom/DB manages index space usage at the block level. The process of adding index entries and pointers adds to an existing index block until it is full. At that point the index must be split. CA Datacom/DB chooses intelligent split points based on the pattern of maintenance to the existing block and, from there, continues filling existing blocks until they must split.

Based on the above add patterns, each low level (DXX) block represents a given key range into which future adds may fall. If only some of the pointers or entries are deleted in a given block, the space formerly occupied by them is available for new adds, but only within the key range of that block. When future adds are all outside this range, index fragmentation results.

If all entries are deleted from an index block, it is reclaimed as a free block and is then available for future use. In this case, no fragmentation exists.

Instead of defragmenting the IXX by performing an INIT of the IXX then doing a RETIX or LOAD of the DBID, you can simply use the DEFRAG function. The DEFRAG function does not alter the high level IXX blocks or lower the number of index levels.

DEFRAG SMP locking is used to interact with backwards processing in the index, such as when a LOCBR command is issued. Information about DEFRAG SMP locking can be found in the SMP Informational Report obtained by specifying it with the SMPTASK Multi-User startup option. See the listing of the DEFRAG event in the table shown in the section SMP Informational Report.