Hi All,
Hibernate version: 4.1.7
I have an application that use SQL IN keyword with collections of 2000+ elements (may vary for each requests). It results that QueryCachePlan store each request according to number of elements because it store it splitted. (over 400Mo in my case) So a lot of memory is used for plan cache and won't be reused... (having the same number of elements in the InExpression is rare).
I read : https://hibernate.atlassian.net/browse/HHH-1123, quoting : "bad application design to be doing such large IN element restrictions". Her.. maybe :) but done...
So... Not so many solution for me : - Rewrite SQL using temporary table. Complicated at this stage of the project - Modify QueryPlanCache to store only requests with less than X parameters
I don't think there is an easy way to replace SessionFactoryImpl nor QueryPlanCache, but if someone have a better idea that modifying Hibernate source code ?
|