Job scheduler to schedule truncates in database

Hi, guys.

Can I create a Job Scheduler, Queue Processor etc. to truncate those tables below periodically? If not, has any other way to do this through Pega instead of database directly?

PEGADATA.pr_sys_queue_ftsindexer;
PEGADATA.pr_sys_queues;
PEGADATA.pr_log;
PEGADATA.pc_history_work;
PEGARULES.pr_sys_cache_entry;
PEGARULES.pr_sys_cache_dep;
PEGARULES.pr_sys_cache_impl;
PEGARULES.pr_sys_appcache_dep;
PEGARULES.pr_sys_appcache_entry;
PEGARULES.pr_sys_appcache_shortcut;
PEGARULES.pr_sys_rule_impl;
PEGARULES.pr4_rule_sysgen;
PEGARULES.pr_assembledclasses;
PEGADATA.pr_sys_updatescache;
PEGADATA.pr_sys_statusnodes;
PEGADATA.pr_sys_statusdetails;

Thanks.

@GabrielM16837471

I recommended you trigger the job scheduler to run periodically to clean up the tables. However, I am concerned about deleting the tables you listed because those are OOTB tables, so I request you double-check the impacts before cleaning them up.

pc_work_history - Audit information on the case will be lost once you delete it.

pr_sys_queues - SLA entries will be deleted ( this may result in inconsistency on the case workflow because SLA’s won’t be triggered once deleted)

@RameshSangili

Ri, Ramesh. Thanks for your reply.

Pega recommended us to truncate those tables to solution two INCs:

  • Slowness in devlopment environment;

  • Some buttons showing the wrong label

This would be done only in devlopment and homologation environment.

How can i create a Job Scheduler to do this?

@GabrielM16837471

Please go through Pega Academy course

It would be great if your DBA or Cloud team could execute it with scheduled jobs since it requires deleting rows in multiple tables.

@RameshSangili, hi.

I will try this solution. Thank you so much.