Trimming the pr_perf_stats table

In a production setting, the pr_perf_stats table can grow to contain millions of rows. By default, the system automatically purges records older than 30 days. If you do not need older rows for performance analysis, debugging, or other reporting, you can purge them by date (known as trimming) without affecting other system capabilities.

Once each day, the Pega-RULES agent starts a stored procedure that purges older rows of this table, passing the value of the pxProcess property as the number of days to retain.
  1. Optional: To set a retention period longer or shorter than the 30 day default, complete the following steps.
    1. Add or revise the following element in your prconfig.xml file, where nnn is the number of days to retain.
      <env name="usage/retentionperiod" value="nnn" />
      Note: The number of days retained is the number of days plus one. For example, if set to 1, the system keeps two days of data, today and yesterday.
    2. Restart Pega Platform.
  2. Optional: To disable the collection of performance statistics, complete either of the following steps.
    1. Add or revise the following element in your prconfig.xml file, and restart Pega Platform.
      <env name="usage/usagetrackingenabled" value="false" />
    2. Update the following Pega-RULES dynamic system setting to false.
      usage/usagetrackingenabled