We are using task service to retrieve running tasks using the taskService
the query also filters on task assignee and couple of other taskvariables and processvariables
The full API call will look like somewhat the following
taskService.createTaskQuery().includeProcessVariables().includeTaskLocalVariables().or().taskVariableValueEquals("DEPARTMENT_ID", departmentID).taskVariableValueEquals("DEPARTMENT_ID", departmentID2).endOr().processDefinitionKey("myProcess_v1").or(). .processVariableValueEquals(FLOW_STATUS, status).endor().listPage(0,25)
I have 551 objects in ACT_RU_TASK and 42100 objects in the ACT_RU_VARIABLE table.
The response is taking more than 30 seconds sometimes.
When I turned on the debugging and wrote a test, I found the following log
Preparing: select * from ACT_GE_BYTEARRAY where ID_ = ?
DEBUG selectVariableByteArray - ====> Parameters: 0088cb1f-b18a-11eb-8819-0242ac120002(String)
DEBUG selectVariableByteArray - <==== Total: 1
The above log came almost 450 times.
How can I improve the performance?
I also have 17939 objects in the ACT_HI_TASKINST table