Support Article
Performance issues with queries on unexposed properties
SA-40706
Summary
Users are observing long wait times (20+ seconds) when running reports or accessing functionality that reports on unexposed properties. Many PEGA0005 alerts are found in the PegaRULES-ALERT logfile.
Error Messages
PEGA0005 alerts similar to the following:
Database operation took more than the threshold of 500 ms: 2,772 ms SQL: SELECT DISTINCT PEGADATA.pr_read_from_stream('.pyFlowName', "PC0".pzInsKey, "PC0".pzPVStream) AS "pyFlowName" , PEGADATA.pr_read_from_stream('.pyAssignmentClass', "PC0".pzInsKey, "PC0".pzPVStream) ...WHERE ( "PC0".PXHISTORYFORREFERENCE = ? AND PEGADATA.pr_read_from_stream('.pyAssignmentClass', "PC0".pzInsKey, "PC0".pzPVStream)
Steps to Reproduce
Not Applicable
Root Cause
PEGA0005 alerts that document queries that use pr_read_from_stream() indicates that the properties included in the query are not optimized for reporting. This is particularly critical for criteria (WHERE) clauses.
Resolution
Optimize the properties for reporting.
Furthermore, properties used in WHERE clauses should typically have indexes built on them.
Published August 26, 2017 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.