14.3.5 Best Practices/Guidelines for Running Purge Scripts

The following is a list of best practices and guidelines for running purge scripts:
  • Determine the retention period based on the business requirements and rules and policies used.
  • Perform regular purge/archive.
  • Make sure replication is not enabled during the window when these scripts are run.
  • Run the scripts during off peak load hours as archive and purge can be resource (CPU) intensive.
  • If archiving is required, make sure there is enough disk space available on the database server since the data would be moved to archive tables instead of simply purging. Archival space should be equal to or greater than the current table's storage.
  • Plan your purging strategy as purging requires a significant amount of time if there are millions of rows that need to be deleted or copied from the database.
  • Oracle recommends that custom purging scripts only include the tables used by the standard purging scripts provided. The alterations to the provided purge scripts can include parameterization for user ID. Such alterations should be thoroughly tested before being used in production to ensure they function as expected.