09 April,2013 by Tom Collins
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"
This is only a preview. Your comment has not yet been posted.
As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.
Having trouble reading this image? View an alternate.
Posted by: |