New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[JBPM-10100] [GSS] (7.12.0) Select from PROCESSINSTANCELOG takes too long #1554
Conversation
Jenkins run fdb |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something regarding format and also a question about indexes when grouping.
@@ -2,7 +2,7 @@ | |||
{ | |||
"query-name": "jbpmProcessInstances", | |||
"query-source": "${org.kie.server.persistence.ds}", | |||
"query-expression": "select log.processInstanceId, log.processId, log.start_date, log.end_date, log.status, log.parentProcessInstanceId, log.outcome, log.duration, log.user_identity, log.processVersion, log.processName, log.correlationKey, log.externalId, log.processInstanceDescription, log.sla_due_date, log.slaCompliance, COALESCE(info.lastModificationDate, log.end_date) as lastModificationDate, (select COUNT(errInfo.id) from ExecutionErrorInfo errInfo where errInfo.PROCESS_INST_ID=log.processInstanceId and errInfo.ERROR_ACK=0) as errorCount from ProcessInstanceLog log left join ProcessInstanceInfo info on info.InstanceId=log.processInstanceId", | |||
"query-expression": "SELECT log.processInstanceId, log.processId, log.start_date, log.end_date, log.status, log.parentProcessInstanceId, log.outcome, log.duration, log.user_identity, log.processVersion, log.processName, log.correlationKey, log.externalId, log.processInstanceDescription, log.sla_due_date, log.slaCompliance, COALESCE ( info.lastModificationDate, log.end_date ) AS lastModificationDate, COUNT( errInfo.id ) errorCount FROM ProcessInstanceLog log INNER JOIN ExecutionErrorInfo errInfo ON errInfo.Process_Inst_Id=log.processInstanceId AND errInfo.ERROR_ACK=0 LEFT JOIN ProcessInstanceInfo info ON info.InstanceId=log.processInstanceId GROUP BY log.processInstanceId, log.processId, log.start_date, log.end_date, log.status, log.parentProcessInstanceId, log.outcome, log.duration, log.user_identity, log.processVersion, log.processName, log.correlationKey, log.externalId, log.processInstanceDescription, log.sla_due_date, log.slaCompliance, COALESCE ( info.lastModificationDate, log.end_date ) HAVING COUNT( errInfo.id ) > 0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To keep the same "capitalization" for all the columns, shouldn't it be
- process_Inst_Id vs. Process_Inst_Id
- error_Ack vs. ERROR_ACK
- instanceId vs. InstanceId
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there is no need for that
@@ -2,7 +2,7 @@ | |||
{ | |||
"query-name": "jbpmProcessInstances", | |||
"query-source": "${org.kie.server.persistence.ds}", | |||
"query-expression": "select log.processInstanceId, log.processId, log.start_date, log.end_date, log.status, log.parentProcessInstanceId, log.outcome, log.duration, log.user_identity, log.processVersion, log.processName, log.correlationKey, log.externalId, log.processInstanceDescription, log.sla_due_date, log.slaCompliance, COALESCE(info.lastModificationDate, log.end_date) as lastModificationDate, (select COUNT(errInfo.id) from ExecutionErrorInfo errInfo where errInfo.PROCESS_INST_ID=log.processInstanceId and errInfo.ERROR_ACK=0) as errorCount from ProcessInstanceLog log left join ProcessInstanceInfo info on info.InstanceId=log.processInstanceId", | |||
"query-expression": "SELECT log.processInstanceId, log.processId, log.start_date, log.end_date, log.status, log.parentProcessInstanceId, log.outcome, log.duration, log.user_identity, log.processVersion, log.processName, log.correlationKey, log.externalId, log.processInstanceDescription, log.sla_due_date, log.slaCompliance, COALESCE ( info.lastModificationDate, log.end_date ) AS lastModificationDate, COUNT( errInfo.id ) errorCount FROM ProcessInstanceLog log INNER JOIN ExecutionErrorInfo errInfo ON errInfo.Process_Inst_Id=log.processInstanceId AND errInfo.ERROR_ACK=0 LEFT JOIN ProcessInstanceInfo info ON info.InstanceId=log.processInstanceId GROUP BY log.processInstanceId, log.processId, log.start_date, log.end_date, log.status, log.parentProcessInstanceId, log.outcome, log.duration, log.user_identity, log.processVersion, log.processName, log.correlationKey, log.externalId, log.processInstanceDescription, log.sla_due_date, log.slaCompliance, COALESCE ( info.lastModificationDate, log.end_date ) HAVING COUNT( errInfo.id ) > 0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One question: none of these are indexes to group based on them:
log.sla_due_date, log.slaCompliance, info.lastModificationDate
Should it affect performance?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not it should not as you are not ordering by those.
Jira: https://issues.redhat.com/browse/JBPM-10100