As table data changes , logically sequential data may be on non-sequential physical pages. The database needs to perform added reads . Table Fragmentation leads to a slower response time.
DB2 has an option to commit automatic reorganization. They can also be defragmented manually with the REORG command. An example:
REORG TABLE user1.”myTable” inplace;
The inplace keywords maintains an asynchronous reorganization, allowing write access to the tables during reorgnization.
When to commit a REORG?
One method is to check the SYSSTAT.TABLES view and watch the overflow value. The overflow value represents row numbers that don’t fit on the original pages – caused by variable – length columns expanding no longer fitting onto the data page location
db2 "select overflow from sysstat.tables order by overflow ASC"