After many INSERT, DELETE, and UPDATE changes to table
data, often involving variable length columns activity, the logically
sequential data might be on non-sequential physical data pages. The
database manager must perform additional read operations to access
data. You can use the REORG command to reorganize DB2® tables, eliminating fragmentation
and reclaiming space.
Regularly scheduled REORGs improve I/O and significantly reduce
elapsed time. Implement a regularly scheduled maintenance plan.
DB2 provides the following
types of REORG operation,
classic
REORG and
In-Place REORG.
If you have an established database maintenance window, use the classic
REORG. If you operate a 24 by 7 operation, use the In-Place REORG.
- Classic REORG
- The fastest method of REORG
- Indexes rebuilt during the reorganization
- Ensures perfectly ordered data
- Access limited to read-only during the UNLOAD phase, with no access
during other phases
- Not restartable
- In-Place REORG
- Slower than the Classic REORG and takes more time to complete
- Does not ensure perfectly ordered data or indexes
- Requires more log space
- Can be paused and restart
- Can allow applications to access the database during reorganization