Purge Aged Price History Data (prchstprg)
Module Name |
prchstprg.pc |
Description |
Purge Aged Price History Data |
Functional Area |
Foundation Data |
Module Type |
Admin |
Module Technology |
ProC |
Catalog ID |
RMS298 |
Wrapper Script |
rmswrap_multi.ksh |
Design Overview
This batch program deletes price history records, which are older than the price history retention days system parameter.
This program ensures that the most recent price history record for the item/location/transaction type combination is preserved and deletes all aged records.
Restart/Recovery
This program will use the commit_max_ctr on the restart_control table to periodically commit SQL delete operations. Restart/Recovery is achieved by processing records that have not been deleted. The restart bookmark table stores the current partition position as the bookmark string to restart a thread.
However, in cases where the price history table is very large, a particularly large rollback segment may be specified to reduce the risk of exceeding rollback segment space. This will depend on the size of normal rollback segments and the size of the price history table.
Performance Considerations
The commit max counter field should be set to prevent excessive rollback space usage, and to reduce the overhead of file I/O. The recommended commit counter setting is 10000 records (subject to change based on experimentation). In case the price history table is very large then the number of partitions on the table may be increased and then after the number of threads for this program should be increased.