Performance considerations using RESTRUCTURE to increase record length
search cancel

Performance considerations using RESTRUCTURE to increase record length

book

Article ID: 12578

calendar_today

Updated On:

Products

IDMS IDMS - Database

Issue/Introduction

When using RESTRUCTURE SEGMENT to add several new fields to an existing record, can this have any adverse performance effects on accessing the database after the RESTRUCTURE?

If so, what can be done to minimize the negative effect? 

Environment

Release: All supported releases.

Resolution

When increasing the length of a record with the RESTRUCTURE SEGMENT utility, consider that the utility will relocate any record that will not fit back on its page at its new length.

DBKEYS cannot change during a RESTRUCTURE, so if there is insufficient space on any page to hold the increased length of records that currently reside on that page, the utility will find another page where the new-length record will fit, and will leave a small "placeholder" record (SR2) on the original page that will point to the relocated record (SR3).

If this happens to many records, it could increase I/O of a program accessing the records.

Also, for application programs accessing the area in update mode, when the IDMS DBMS encounters an SR2/SR3, it will always check to see if the record will fit back on the original page, and if so, it will bring it back and delete the SR2 and SR3. This is additional work that would not be done if there were no relocated records.

Therefore, before executing such a RESTRUCTURE, try to determine as best as possible, using utilities such as PRINT SPACE and IDMSDBAN (Report 4 Record Data), the number of existing records per page, and whether the pages have enough space to hold all of the records at their new increased length.  

If the pages have enough free space to fit all restructured records, this will completely avoid the relocation of records.

If they do not appear to have enough free space, consider running EXPAND PAGE first, if it is feasible, to provide some extra space on each page in the area.