When the index compacting utility takes a long time to run, it displays runtime status approximately every two minutes. The status displays how much compacting has completed and estimates the time remaining. It also displays the percentage of compaction completed for each iteration or loop with respect to the total number of iterations. You can use Ctrl+C to stop a long-running compacting process.

For example, this command returns status messages as it compacts the indexes in fld_det.fld_serialno:
proutil testdb -C idxcompact fld_det.fld_serialno 100
proutil testdb -C idxcompact fld_det.fld_serialno
5% complete, estimated time remaining: 0 hour(s) 37 minute(s) 8 second(s) (loop 1/3, 15%).
10% complete, estimated time remaining: 0 hour(s) 34 minute(s) 33 second(s) (loop 1/3, 31%).
15% complete, estimated time remaining: 0 hour(s) 32 minute(s) 32 second(s) (loop 1/3, 47%).
20% complete, estimated time remaining: 0 hour(s) 30 minute(s) 56 second(s) (loop 1/3, 62%).
25% complete, estimated time remaining: 0 hour(s) 29 minute(s) 7 second(s) (loop 1/3, 77%).
30% complete, estimated time remaining: 0 hour(s) 27 minute(s) 4 second(s) (loop 1/3, 92%).
37% complete, estimated time remaining: 0 hour(s) 23 minute(s) 45 second(s) (loop 2/3, 11%).
44% complete, estimated time remaining: 0 hour(s) 20 minute(s) 10 second(s) (loop 2/3, 33%).
51% complete, estimated time remaining: 0 hour(s) 17 minute(s) 0 second(s) (loop 2/3, 54%).
71% complete, estimated time remaining: 0 hour(s) 8 minute(s) 11 second(s) (loop 3/3, 3%).
87% complete, estimated time remaining: 0 hour(s) 3 minute(s) 11 second(s) (loop 3/3, 57%).
Index compaction successfully completed (16180)

IDXCOMPACT status messages

The unusedblocks option causes PROUTIL IDXCOMPACT to scan only the delete chain and clean upblocks if the index is a unique index, thereby improving the OLTP performance and speeding up certain PROUTIL IDXCOMPACT operations because the unused blocks can take up a lot of space. For unique indexes, the status messages of the IDXCOMPACT operation vary based on the specification of unusedblocks in conjunction with the -compactonly parameter.
  • To only compact the index tree and disable scanning for delete holders or perform block clean-up, specify -compactonly. A status message such as follows, appears:
    proutil testdb -C idxcompact customer.cust-num -compactonly
    Index compact cleaned 0 index delete holders from 0 blocks. (20970) 
    Index compaction successfully completed (16180)
  • To process the index delete chain and compact the index, specify both -compactonly and unusedblocks. A status message such as follows, appears:
    proutil testdb -C idxcompact customer.cust-numunusedblocks -compactonly 
    Index compact with 'unusedblocks' option will only process index delete chain. (20529)
    Processed 8 blocks from index delete chain in area 7.
    Index compact cleaned 0 index delete holders from 0 blocks. (20970)
    Index compact successfully processed index delete chain for table:customer, 
    index:cust-num, partitionId:0. (20530)
    Index compaction successfully completed (16180)
  • To remove index delete holders from the index tree that are not on the index delete chain, regardless of the specified percentile or degree of compaction, and also perform block clean-up from the index delete chain, do not specify -compactonly or unusedblocks. A status message such as follows, appears:
    proutil testdb -C idxcompact customer.cust-num 
    Processed 8 blocks from index delete chain in area 7.
    Index compact cleaned 33507 index delete holders from 149 blocks. (20970)
    Index compaction successfully completed (16180)
  • To only scan the index delete chain and clean up unused blocks, specify unusedblocks. A status message such as follows, appears:
    proutil testb -C idxcompact Customer.CustNum unusedblocks
    Index compact with unusedblocks' option will only process index delete chain. (205029)
    Processed 12 blocks from index delete chain in area 10. 
    Index compact successfully processed index delete chain for table:Customer, 
    index:CustNum, partitionId:0 (20530)
    After the cleanup, you can check PROUTIL -C DBANALYS output to see how many blocks remain in the index delete chain. For example:
    INDEX DELETE CHAIN ANALYSIS
    				-------------------
    				1
    				Number of         Object        Object
    				Blocks            Type                  
    				-----------------------------------------
    				0                 Index         PUB.Customer.CustNum:13
Note:
  • IDXCOMPACT status messages are reported in the database log (.lg) file.

  • For the complete syntax description, see PROUTIL IDXCOMPACT qualifier.