I am running a 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?
If you are 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 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, you should attempt to determine as best as possible, using utilities such as PRINT SPACE and DBAN (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 your pages have enough free space to fit all restructured records you 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.