Skip to main content


         This documentation site is for previous versions. Visit our new documentation site for current releases.      
 

Trimming, purging, and archiving tables

Updated on August 25, 2021

You can trim or purge tables by using an SQL query tool. In a development system, using an SQL query tool is fast and often appropriate. As a best practice in a production setting, implement trimming and purging operations using activities, either run on request or run automatically by an agent.

Using an activity might be slower and more resource-intensive, but it helps ensure database integrity, handles errors, and causes internally maintained Index- instances to be deleted appropriately by Declare Index rules.

You can use the standard activity Log-.TrimLog to purge instances of one concrete class derived from the Log- base class, retaining instances less than N days old, where N is a parameter to the activity. This activity records the number of records trimmed in the Pega log file.

The Pega-RULES agent normally runs the standard Code-.SystemCleaner activity once each day for housekeeping tasks. You can add a similar activity to another agent in your application to purge outdated information and recover table space. Make sure that the new agent has access to the appropriate ruleset versions, and do not purge records that are referenced in other tables.

Work item purging and archiving

Work item details are stored as rows of many different tables. To purge work items or move them to an archive, it is important to remove all the pieces, and to remove only those work items that are not active. Use the Purge/Archive wizard to purge or archive work items and their details.

Have a question? Get answers now.

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

Did you find this content helpful?

Want to help us improve this content?

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

Pega.com is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us