openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kevin Sutter (JIRA)" <>
Subject [jira] Updated: (OPENJPA-407) Cache SQL (or closer precursors to SQL) more aggressively
Date Thu, 27 Mar 2008 15:27:24 GMT


Kevin Sutter updated OPENJPA-407:

    Attachment: openjpa-407.patch

Attaching a new version of the first patch for this Issue.  All of the stated comments about
the first patch have been addressed.  But, this is not the "final" patch.  There are still
some areas that could use some improvement, but I wanted to get the basic updates in place
so that we can move forward.  Also, by getting these into trunk, we can wring out any potential

This patch introduces a property (modeled after the QueryCompilationCache property):

o  true - uses CacheMap (default)
o  all - uses a ConcurrentHashMap
o  false - none

As before, this improvement attempts to cache the SelectImpls and associated SQLBuffers for
common findBy operations.  The cache is scoped to an EntityManager instance.

The patch also includes new trace messages for cache hits and misses.

Any comments would be appreciated.  Like I mentioned, I would like to integrate this much
of the patch soon since this is not a full-time Issue for me and it's a pain to continually
update my environment.  If we're generally okay with the approach, then I'd like to commit
and then move on to the next level of SQL generation caching.


> Cache SQL (or closer precursors to SQL) more aggressively
> ---------------------------------------------------------
>                 Key: OPENJPA-407
>                 URL:
>             Project: OpenJPA
>          Issue Type: Improvement
>          Components: jdbc, kernel, query, sql
>    Affects Versions: 0.9.0, 0.9.6, 0.9.7, 1.0.0
>            Reporter: Patrick Linskey
>             Fix For: 1.1.0
>         Attachments: findBy.patch, openjpa-407.patch, OPENJPA-407.patch
> When data is not available in the data cache, OpenJPA dynamically creates SQL to look
up the requested data. OpenJPA should more aggressively cache this SQL to accelerate pathways
from a cache miss to the database.
> The generated SQL takes a number of factors into account, including the requested records,
transaction status, currently-loaded data, and the current fetch configuration. Any caching
would need to account for these factors as well.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message