OPS0039: Long-running SQL query
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.