Hibernate Query Spaces – Optimizing Flush and Cache Operations
Hibernate needs to ensure that all tables referenced in a query are up to date before executing the query. That means it has to flush all pending changes for these tables before it runs the query. Otherwise, the database would process the query on an outdated data set and return wrong results. Hibernate not only…