Perfomance issue with the SLA Query
A systems admin has monitored database performance, and has observed exceptionally poor performance on one specific SQL statement. Request assistance analyzing the SQL and providing recommendations to resolve. DBMS is Oracle.
There are no error messages on the screen, and no applicable error messages in the Pega log.
However, the Pega ALERT log is rife with the PEGA0005 alert against stored procedure sppr_sys_reservequeueitem_b.
Closer examination of the customer identified SQL:
PYITEMSTATUS = ? AND
PYAGENTNAME = ? AND
PYMINIMUMDATETIMEFORPROCESSING <= ?
WHERE ROWNUM <= 10
Reveals that the SOURCE of this SQL statement is indeed from the stored procedure - specifically, the second half of the stored procedure code generates this specific SQL.
Steps to Reproduce
Unknown. This issue is observed throughout the lifetime of the JVM instance - from startup to shutdown. No specific steps were found to trigger the issue.
The root cause is two fold:
- a previously identified problem in the ORDER BY clause of stored procedure sppr_sys_reservequeueitem_b.
- a fault in Pega code: sometimes calls to this stored procedure are incorrectly generated - missing a TABLE_NAME parameter in the call.
To resolve this issue:
- Alter the stored procedure ORDER BY clause:
(stored procedure line 50)
set @sorting = N' order by pzInsKey ASC '
set @sorting = N' order by pyMinimumDateTimeForProcessing ASC ‘
- Implement Software Fix HFIX-21858
This corrects the problem of the invalid/missing TABLE_NAME parameter in the call to the stored procedure.
0% found this useful