openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tlianza <nab...@lianza.org>
Subject Using QueryCache, still seeing queries sent to the DB
Date Wed, 28 Aug 2013 21:55:07 GMT
Hi All,

My application does many things, but one of it's most frequent JPQL queries
is this one:

SELECT m from ImageRepModel m where m._image = :image AND m._type = :type

On a dev system (with no users), I can see us run this query many times on
one page - they all go through JPA and hit the database. When I reload the
page - same thing. None of these results are changing, and yet none of them
appear to be in the JPA QueryCache. When I inspect the QueryCache
(OpenJPAEntityManagerFactory getQueryResultCache) I can see hundreds of
queries in it, many of which match this query on my page.

Looking at the QueryCache statistics in JMX, it reports no evictions. I've
also tried various excessively-large parameters to increase the size of the
query cache (100,000 CacheSize, etc). Still, I'm seeing all of these queries
hit the db. This is a simple one-box setup, so the
openjpa.remoteCommitProvider is set to sjvm.

Any advice for further troubleshooting would be appreciated.



--
View this message in context: http://openjpa.208410.n2.nabble.com/Using-QueryCache-still-seeing-queries-sent-to-the-DB-tp7584807.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.

Mime
View raw message