Reduce execution time / database trips

cancel
Showing results for 
Search instead for 
Did you mean: 
James3000
Member II

Reduce execution time / database trips

We have recently moved our app to a different datacentre from out database and we found the increased latency was slowing queries throughout our application. We managed to largely resolve this by batch fetching queries by increasing the default_batch_fetch_size in Hibernate, which is our JPA implementation. Our stack is Spring-Boot, Hibernate, Oracle.

 

We use Activiti 5.22.0 and it looks like we have the same issue. i.e. when we run a query such as;

 

taskService.createTaskQuery().active().includeProcessVariables().includeTaskLocalVariables().list();

We see a large number of executions which slows the overall lookup down significantly due to the increased database trip time per execution.

 

Is there any way to set a batch fetch size to reduce the overall number of executions?