Support Article
pyAssignmentListGadget takes too long to load
SA-15874
Summary
Queries from dashboard items, pyAssignmentListGadget section and pyWorkBasketAssignmentsDefinition, are taking too long to complete(10-15 seconds).
Error Messages
Database operation took more than the threshold of 500 ms: 22,719 ms SQL: SELECT "PC0".PYASSIGNMENTSTATUS AS "pyAssignmentStatus" , "PC0".PXASSIGNEDOPERATORID AS "pxAssignedOperatorID" , "PC0".PXFLOWNAME AS "pxFlowName" , "PC0".PZINSKEY AS "pzInsKey" , "PC0".PYLABEL AS "pyLabel" , "PC0".PYINSTRUCTIONS AS "pyInstructions" , "PC0".PXCREATEDATETIME AS "pxCreateDateTime" , "PC0".PXDEADLINETIME AS "pxDeadlineTime" , "PC0".PXURGENCYASSIGN AS "pxUrgencyAssign" , "PC0".PXGOALTIME AS "pxGoalTime" , "PC0".PXFLOWINSKEY AS "pxFlowInsKey" , "FlowPage".PYLABEL AS "pyLabel" , "PC0".PXREFOBJECTKEY AS "pxRefObjectKey" , "PC0".PXREFOBJECTCLASS AS "pxRefObjectClass" , "PC0".PXSERVICELEVELNAME AS "pxServiceLevelName" FROM PEGA_CDR_PROD_DATA.pc_assign_workbasket "PC0" LEFT OUTER JOIN PEGA_CDR_PROD_RULES.pr4_rule_flow "FlowPage" ON ( ( "FlowPage".PZINSKEY = "PC0".PXFLOWINSKEY ) AND "FlowPage".PXOBJCLASS = ? AND "PC0".PXOBJCLASS = ? ) WHERE ( "PC0".PXREFOBJECTKEY = ? AND "PC0".PXOBJCLASS = ? AND "PC0".PXFLOWNAME != ? AND "PC0".PXSYSTEMFLOW = ? ) ORDER BY 7 ASC
Steps to Reproduce
1) Open WO in perform or review harness with pyAssignmentListGadget Section.
Root Cause
The SQL query generated for the report definition contained a condition that results in performance issues for Oracle:
"PC0".PXFLOWNAME != ? Running the Oracle Advisor on the query yielded the following warning:
Predicate "PC0"."PXFLOWNAME"<>'OverallSLA' used at line ID 4 of the execution plan is an inequality condition on indexed column "PXFLOWNAME". This inequality condition prevents the optimizer from efficiently using indices on table "PEGA_CDR_PROD_DATA"."PC_ASSIGN_WORKBASKET"
....
planType=original&event=origPlan&objectId=1&execID=2926&target=cdrp7prd_cdrp7prd2&type=oracle_database&task_id=3062&taskName=SQL_TUNING_1445007279547&taskUser=AAA6065>
The optimizer is unable to use an index if the predicate is an inequality condition or if there is an expression or an implicit data type conversion on the indexed column.
Resolution
Perform the following local-change:
The "pxFlowName is not equal to <param>" condition was removed from the report definition, which removed the corresponding condition from the generated SQL query.
Published January 31, 2016 - 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.