IBM Support

Database Reorganization - User specified starting point

News


Abstract

The Reorganize Physical File Member (RGZPFM) command removes deleted records from (compresses) one member of a physical file in the database, and it optionally reorganizes that member.

Content

You are in: IBM i Technology Updates > Db2 for i - Technology UpdatesDb2 for i Database Engineer (DBE) Enhancements > Database Reorganization - User specified starting point

The Reorganize Physical File Member (RGZPFM) command removes deleted records from (compresses) one member of a physical file in the database, and it optionally reorganizes that member.

This reorganize support has been enhanced in three ways:

1) Improved performance
New FROMRCD keyword
FROMRCD - Specifies which records in the file will be reorganized. Only records from the specified record to the end of the file will be reorganized.
Using the new FROMRCD(*PRVRGZ) parameter option drives:
  • Better pre-bring of the rows processed during reorganize
  • Suspended statistics during reorganization
 
2) Improved concurrency
A limit on the number of rows changed in a reorganize transaction so that typically no row will be locked for a time larger than the file or override WAITRCD value. This reduces the possibility of conflict with concurrent applications.
3) Improved Information
New message sent if the amount of storage returned was less than expected (this is an estimate)
New status file row that will store information about the truncate
Navigator - Reorganize status will show the user how many deleted rows were recovered, the space returned (if any), the RRN that was used to start the reorganize.

FROMRCD Parameter details:
Specifies which records in the file will be reorganized.
Only records from the specified record to the end of the file will be reorganized.
*START
All records in the file will be reorganized.
*PRVRGZ
If the previous reorganize of this file was unable to remove some or all of the deleted records, the reorganize will begin at the record that would have been the last record in the file if a concurrent insert had not prevented the deleted records from being removed. If the previous reorganize completed normally and was able to remove the deleted records, the reorganize will begin with the first record in the file.
*PRVRGZ is ignored if the reorganize is continued from a previously canceled reorganize.
If *PRVRGZ is specified, ALWCANCEL(*YES) must be specified and either KEYFILE(*RPLDLTRCD) or KEYFILE(*NONE) must be specified.
1-4294967288
Specifies the record number of the first record to be reorganized.
If a record number greater than 1 is specified, ALWCANCEL(*YES) must be specified and either KEYFILE(*RPLDLTRCD) or KEYFILE(*NONE) must be specified.

[{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SWG60","label":"IBM i"},"Component":"","Platform":[{"code":"PF012","label":"IBM i"}],"Version":"All Versions","Edition":"","Line of Business":{"code":"LOB57","label":"Power"}}]

Document Information

Modified date:
11 April 2021

UID

ibm11168762