Hi Daryl,
  Prepared Query Cache is used when a JPQL query is executed *more than
once*. What Prepared Query Cache does is to cache the target SQL query upon
first execution of JPQL and in subsequent invocation of the same JPQL,
executes the SQL without paying the cost of forming the SQL again. This has
significant performance benefits (+50% in some cases). The tricky part of
the problem is to reparametrize the cached SQL on subsequent executions. 
  The failure as you had seen with that cache being active is related to
that re-parametrization path. The parametrization of the cached SQL is not
always possible -- especially for IN expression parameters which can vary in
number of parameters on successive executions. Ideally we should be able to
detect such limitation during re-parametrization and fall back
*automatically* to execute the original JPQL. Somehow with your test that
did not happen. 
  So, can you please post the test that failed with
openjpa.jdbc.QuerySQLCache=true? 
  Also mention which version of OpenJPA was used for the test.



Daryl Stultz wrote:
> 
> On Sat, Dec 12, 2009 at 7:44 PM, Pinaki Poddar <[email protected]> wrote:
> 
>>
>> Set <property name="openjpa.jdbc.QuerySQLCache", value="false"/>
>>
>> That took care of the secondary problem, so I can now complete the action
> that was originally failing.
> 
> Thanks.
> 
> -- 
> Daryl Stultz
> _____________________________________
> 6 Degrees Software and Consulting, Inc.
> http://www.6degrees.com
> mailto:[email protected]
> 
> 


-----
Pinaki 
-- 
View this message in context: 
http://n2.nabble.com/Fetch-plan-question-tp4117231p4164748.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.

Reply via email to