REORG replacing the nz_groom script

In Netezza, nz_groom uses the GROOM TABLE command to remove outdated and deleted records from tables. The GROOM TABLE command reclaims disk space, reorganizes tables that are based on the organizing keys, and migrates data for tables that have multiple stored versions. In Db2® Warehouse, the REORG command is used to replace the nz_groom functionality.

There are no multiple stored versions of data on tables in Db2, so only the fragments of tables are reclaimed.

After many changes to table data, a table and its indexes can become fragmented. Logically sequential data might be found on nonsequential pages, forcing additional read operations by the database manager to access data. The automatic reorganization process determines the need for table or index reorganization. It periodically evaluates tables and indexes that had their statistics updated to see whether reorganization is required, and schedules such operations whenever they are necessary. Then it reorganizes tables and indexes to improve access performance and reclaim fragmented space. The reorganization of tables/indexes is completely automatic in dashDB. No user actions are required.