Hibernate 6 performance degradation due to default FetchMode

We have recently upgraded from Hibernate 5 to Hibernate 6, and we have noticed performance degradation on many of our queries. In some of the cases we could match the performance to that of Hibernate 5, by adding @Fetch(FetchMode.SELECT) to some of the entity relationships. But the code base is rather large and we are not sure of the side effects if we blindly add them to every entity. My questions are:

  1. Do you know if the default in Hibernate 5 was @Fetch(FetchMode.SELECT) and changed in Hibernate 6?

  2. Is there a way we can set the default globally to @Fetch(FetchMode.SELECT) so that we don’t have to add them on every single relationship?

  3. Is there any other setting we can try to make the number of joins in the generated queries match that of Hibernate 5?

BTW, the version we are using is 6.1.6.Final.

Many thanks in advance.

Hibernate 6.1 is unsupported. Update to 6.4.1 if you want any help. Apart from that, please read the migration guides, it’s all covered in there: 6.0 Migration Guide