Details
-
Bug
-
Resolution: Fixed
-
Low
-
3.0.0
-
None
-
None
Description
For queries with an IN clause we use HqlBatchedInClauseHelper that splits the query into a number of queries, where each subquery's in clause is limited to a number of items (100 by default), to better support certain DBMSes which have trouble with large IN clauses.
The subqueries generated by HqlBatchedInClauseHelper are then iterated, which can be problematic if the base query is expected to be cached. The iterated queries don't go through Hibernate's query cache, potentially causing them to be executed a bunch of times.
This affects a few areas of the application, notably checking project permissions.