Consultor Eletrônico



Kbase P31842: What is the Record Manager and how does it work?
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   01/08/2003
Status: Unverified

GOAL:

What is the Record Manager?

GOAL:

How does the Record Manager work?

FIX:

There are three blocks in question when discussing the Record Manager.



The RM (Record Management) block.
Contains 75 bytes free in each block to allow for future expansion in the event that the record is updated. Allocation of the free bytes is to reduce the records becoming split across multiple blocks when updates occur.


The RM Chain blocks
RM Chain blocks are neither full nor empty.  If a block has 250 bytes or more free then the block is put on the RM Chain.


The Free Chain blocks
Free Chain blocks are empty, Progress formatted blocks. These blocks are available to be allocated as either index blocks or data blocks.


Blocks are added to the RM Chain in two conditions, when a free block is used to store newly created records that leave the block partially full or when record deletion causes a block to become partially empty. Either way, the blocks have the potential to hold more data. Blocks are moved off the RM Chain when a block becomes completely full or record deletion causes the block to become completely empty.

After a purge of data on the database the number of blocks on the RM Chain will grow significantly.  When new records are created, Progress will first search the RM Chain for a block that has enough space to store the new record. The database engine will make three attempts to place the record completely in a block that resides on the RM Chain. The three attempts will be made against the first three blocks on the chain.  If there is room in any of the first three blocks to hold the entire record, the record is placed in the block and the operation is finished.  If there is not enough space in the first three blocks, a block from the Free Chain is taken to store the record. If the record is larger than 1 block, we will grab another block from the Free Chain to hold the overflow.  The first block that we searched in the RM Chain is then moved to the bottom of the RM Chain so that the same three blocks are not continued to be searched.