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;