[jboss-jira] [JBoss JIRA] (DROOLS-4919) Long running query at kie-server startup

Jonathan Fisher (Jira) issues at jboss.org
Thu Jan 23 10:17:14 EST 2020


    [ https://issues.redhat.com/browse/DROOLS-4919?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13955516#comment-13955516 ] 

Jonathan Fisher commented on DROOLS-4919:
-----------------------------------------

Any reason why that SQL is being executed? It seems to want to read _the entire_ VariableInstanceLog table which can be quite large (we have a couple hundred thousand rows on it). Could the query be more optimized?

> Long running query at kie-server startup
> ----------------------------------------
>
>                 Key: DROOLS-4919
>                 URL: https://issues.redhat.com/browse/DROOLS-4919
>             Project: Drools
>          Issue Type: Bug
>          Components: kie server
>    Affects Versions: 7.28.0.Final
>            Reporter: Danny Rucker
>            Assignee: Maciej Swiderski
>            Priority: Major
>
> The following query is executed at start up of kie-server
> ```
> select vil.processInstanceId, vil.processId, vil.id, vil.variableId, vil.value from VariableInstanceLog vil where vil.id in (select MAX(v.id) from VariableInstanceLog v group by v.variableId, v.processInstanceId)
> ```
> This is causing some issues with getting kie-server to start up.  



--
This message was sent by Atlassian Jira
(v7.13.8#713008)


More information about the jboss-jira mailing list