AnsweredAssumed Answered

listPage doesn't improve query time for createHistoricProcessInstanceQuery when using includeProcessVariables

Question asked by p4w3l on Aug 30, 2015
Latest reply on Aug 30, 2015 by vasile.dirla
includeProcessVariables() in HistoricProcessInstanceQuery increases query time very very seriously.

Query times are:

Without includeProcessVariables() : &lt 1s
With includeProcessVariables() : 20-30s

so I decided to use .listPage( first, pageSize ) but with values like ( 0, 10 ) it is still the same 20-30s

interesting that when using variableValueLike( "searchValue%", searchValue ) that returns 10-20 items it queries quick: 1-2s

I understand that includeProcessVariables() increases query time but why listPage( first, pageSize ) doesn't improve?

Below is my query:

List<HistoricProcessInstance> result = historyService.createHistoricProcessInstanceQuery()
            .processDefinitionKey( "Process1" )
            .variableValueLike( "searchString", searchValue )
            .listPage( first, pageSize );