Skip to main content

OPS0039: Long-running SQL query

Suggest edit Updated on September 4, 2020

Pega Predictive Diagnostic Cloud™ (PDC) generates the OPS0039 event when an SQL query runs for an excessively long time.

Reason for the event

If an SQL query runs longer than the configured schedule, for example, a query that is too complex and requires excessive resources, PDC generates an OPS0039 event and creates a DBQuery case. You can receive a notification for each long-running query.

The default thresholds for this event are:

  • VACUUM and AUTOVACUUM queries – 5 hours
  • CREATE INDEX queries – 1 hour
  • ALTER and all other types of queries – 10 minutes

Example message text

The SQL query running longer than expected.PID for query is 7445. SQL: delete from pegadata.pegaam_index where CLUSTERNAME = $1 and pzTenantId = $2

Recommended next steps

To resolve the issue, analyze the long-running query and decide whether to cancel it or ignore the issue. For example, if the long-running query slows down your database, cancel the query. However, if it does not affect the performance of the database, you might want to ignore the issue.

Did you find this content helpful? YesNo

Have a question? Get answers now.

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

Ready to crush complexity?

Experience the benefits of Pega Community when you log in.

We'd prefer it if you saw us at our best. is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us