LinkedIn
Copied!

PEGA0033 alert: Database query length has exceeded a specified threshold

The PEGA0033 alert is generated if your Pega 7 Platform system sends an SQL query with length in bytes greater than the specified threshold to the PegaRULES database or another SQL database. Such large SQL queries expand the size of database cache memory, and increase memory and CPU resource costs. This alert provides the query length in bytes when the value is over the threshold. The alert is disabled by default.

Example message text

Database query length exceeded the defined threshold value of 2,500: 5,151 SQL: SELECT pzInsKey as "pxInsHandle", pyClassName AS "pyClassName" , pyFlowType AS "pyFlowType" , pyLabel AS "pyLabel" , pyRuleSet AS "pyRuleSet" , pyRuleSetVersion AS "pyRuleSetVersion" , pyCategory AS "pyCategory" , pyCanStartInteractively AS "pyCanStartInteractively" , pyCanCreateWorkObject AS "pyCanCreateWorkObject" , pyStreamName AS "pyStreamName" , pyMethodStatus AS …

Default prconfig.xml setting

<env name="alerts/database/querylength/enabled" value="false" />

To enable the alert, change the value to "true."

<env name = “alerts/database/querylength/threshold" value="2500"

The threshold value is a positive integer that identifies the number of bytes. The default value is 2500.

Reasons for the alert

Identify the List, Summary, RDB, or other operation that is creating the excessively large SQL statement. This condition causes issues with database server memory in which the SQL is cached.

Look for ways to shorten or rewrite the query. If this is not possible and the length is acceptable, increase the threshold.

Have a question? Get answers now.

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