Hi Team ,

We're using JPA + Hibernate with our Hana database. Below is the db model as such..

Vehicle {
     sales
     financial
     maintenance
}

Now the repository is at Master entity Vehicle and when I'm try to access the vehicle with id vehicleRepository.findById(id), all the associated child tables query are being sent in sequence. Is there any way to fire it in parallel.

Please check dynatrace calls as below

SpringBoot Parallel Calls for child level tables from parent repo itself

The yellow blocks can be seen which shows the query is being sent in parallel.

Comment From: wilkinsona

Thanks for getting in touch, but it feels like this is a question that would be better suited to Stack Overflow. As mentioned in the guidelines for contributing, we prefer to use GitHub issues only for bugs and enhancements. Feel free to update this issue with a link to the re-posted question (so that other people can find it) or add some more details if you feel this is a genuine bug.

Comment From: amrit9326

Hi @wilkinsona ,

I tried finding any property at all the blogs but didn't find any jpa or hibernate properties which springs provided to make the calls in parallel from parent level where the child tables query in sequential could be avoided. Could it be consider enhancement or something which could make this possible.

Comment From: wilkinsona

As you're using JPA, the database calls are being made by Hibernate and are out of Spring Boot's control. I don't know for certain if Hibernate supports parallel query execution. Someone on Stack Overflow may be able to help you there. If it doesn't support it, you would have to make a feature request to the Hibernate team.