reorg defrag executes multiple reorganization transactions one right after the other, compared with traditional reorg, which reorganizes the entire table data in a single transaction. You can specify a time interval during which it reorganizes the data. This allows other processes to run concurrently without affecting reorganization.
Syntax:
reorg defrag table_name [partition {partition_list}] [with {time = hh:mm| resume | skip_compact_extents [= pct_value]}]
where:
Compactness = (Total space occupied in an extent / Total space in an extent) x 100
If skip_compact_extents is used, all the extents with compactness greater than or equal to the threshold occupancy percent value specified would be skipped for reorganization. If no threshold percent value is specified, the default percent value is 80%.
In the following examples, 'partition list' is the list of data partitions specified in the command or if none specified, the list of all existing data partitions in the table.
reorg defrag salesdetail [partition {seg1 [,seg2[, seg3]]}]
reorg defrag salesdetail [partition {seg1 [,seg2[,seg3]]}] with time = 01:20
reorg defrag salesdetail [partition {seg1 [,seg2[,seg3]]}] with resume
reorg defrag salesdetail [partition {seg1 [,seg2[,seg3]]}] with skip_compact_extents [ = <1-100>]
reorg defrag salesdetail [partition {seg1 [,seg2[,seg3]]}] with time = 01:20, resume
reorg defrag salesdetail [partition {seg1 [,seg2[,seg3]]}] with time = 01:20, skip_compact_extents [ = <1-100>]
reorg defrag salesdetail [partition {seg1 [,seg2[,seg3]]}] with resume, skip_compact_extents[ = <1-100>]
reorg defrag salesdetail [partition {seg1 [,seg2[,seg3]]}] with time = 01:20, resume, skip_compact_extents [ = <1-100>]For more information about reorg, see the Reference Manual: Commands.
Examined n allocation unit(s). Processed x pages out of y data pages. z% completed, resulting in p% space compaction.At the end of processing each partition, the time elapsed in the current invocation is printed as:
Elapsed time 1m : 56s : 623ms.