Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

How to alter retention period of pr_perf_stats table cleanup

SA-6096

Summary



System upgraded to Pega 7.1.6 

After upgrade database table pr_perf_stats is growing and hit its size limit.

Is there any purge process defined for this table? If there is a purge process is there any way to alter the retention period?



Error Messages



none


Steps to Reproduce



Observe table pr_perf_stats growth


Root Cause



The system also captures performance details for each requestor once each hour and also at sign-off. The usage daemon saves these details as instances of the Log-Usage class in the pr_perf_stats database table.   Once each day, the System Cleaner agent trims older rows of the pr_perf_stats table. This activity starts a stored procedure, passing a number of days to retain based on the value of the pxProcess.pxLogUsage RetentionPeriod property. The default is 30 days. 

In a production setting, the pr_perf_stats table can grow to contain millions of rows.   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. 


Resolution



These help articles provide further details of the pr_perf_stats table and the purging process.

https://pdn.pega.com/sites/default/files/help_v71/procomhelpmain.htm#concepts/concepts2/understandingpegarulesagent.htm

https://pdn.pega.com/sites/default/files/help_v71/procomhelpmain.htm#howto/howto2/logusagetable.htm

Through an entry in the prconfig.xml file or the Dynamic System Settings, you can set this retention period. To set a retention period longer or shorter than the 30 days, add or revise the following element to your prconfig.xml file and restart the system:
<env name="usage/retentionperiod " value="nnn" />
where nnn is the number of days to retain.

As an alternative to the prconfig.xml file, you can use Dynamic System Settings to configure your application.

Published January 31, 2016 - Updated October 8, 2020

Was this useful?

0% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice