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

RULEUSAGESNAPSHOT query takes more than 20 seconds



Pega RuleUsageSnapshot query takes more than 20 seconds.

Error Messages

Database operation took more than the threshold of 300 ms: 20,602 ms SQL: delete from DATA.pr4_log_rule_usage_details where pxObjClass = 'Log-RuleUsage-Details' and pxSystemNode = ? and pyLabel = ?

Steps to Reproduce

Not Applicable

Root Cause

A defect or configuration issue in the operating environment. Explain plan for the delete statement shows it is using table scan and that's why the query takes upwards of 20 seconds.
The cardinality of the three columns in where condition is very low and thus an index won't help too much.

For pxObjClass & pyLabel, only one distinct value; For pxSystemNode, 8 distinct values.


Since the query is executed only once daily and that too during off hours at 1am, the execution time is acceptable and doesn't cause any lasting performance impact on the application. When appropriate, create the necessary index if that avoids a table scan.
Suggest Edit

Published August 26, 2017 - Updated October 8, 2020

Did you find this content helpful? Yes No

Have a question? Get answers now.

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

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
Contact us