We are experiencing the exact same performance issues with the new position of the on-clause, except the tables that are joined together are related to „joined inheritance“. We have a base entity class with 30 implementations. Querying 60 of them by its parent entity (out of a total of 300.000) cost about 2,86ms with hibernate 5. Under hibernate 6 it costs 1s 463ms. My attempts to somehow optimize it on postgresql side were not successful. The planner is simply not able to optimize it as before. Would be nice if there was a simple switch to get the old behavior regarding the position of the on-clause. |