Configurable Query Plan Cache

Description

Our application heavily uses dynamic sql some of which are highly parameterised and with many permutations. Out of neccessity we also have a very large JVM heap space (12GB). As a result we end up with a very large memory utilisation for the Query Plan cache. From a recent memory dump it was noted the QueryPlanCache had 25000 entries and consuming 2.5GB of heap space. Our full Garbage collections end up taking longer than it would normally take with a smaller QueryPlanCache.

I understand via a related issue (http://opensource.atlassian.com/projects/hibernate/browse/HHH-3191) there is a hard limit of 128 entries, and an endless soft limit which is only garbage collected during a full garbage collection. It would be nice if the following features could be added:
1) Configuration options to specify the hard and soft limits (with a 0 to disable or similar).
2) Configurable at the query level such that specific queries can be excluded from the the QueryPlanCache. eg. something like hibernateQuery.setParsedHQLCacheable(false).

Activity

Steve EbersoleAugust 12, 2010 at 6:10 PM

Addressed by

Duplicate

Details

Assignee

Reporter

Components

Priority

Created December 1, 2009 at 10:54 AM
Updated August 12, 2010 at 6:10 PM
Resolved August 12, 2010 at 6:10 PM