[
https://issues.apache.org/jira/browse/OPENJPA-407?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12535697
]
Kevin Sutter commented on OPENJPA-407:
--------------------------------------
Took a quick look at your patch. Much more involved than my initial
experimentation. I was actually looking at it from a Query viewpoint and I was
thinking of caching the generated sql along with the query compilation cache.
That is, if a specific jpql query was cached after it was parsed and compiled,
then couldn't we tag along the cached generated sql. As my previous notes on
the dev mailing list indicated, we would still have to take into account the
variable aspects of the query (parameters, hints, result size, etc). So, maybe
going this route would have hit just as many parts. But, your patch was much
more extensive than I was hoping for. Guess this shows how tight the sql
generation and the "query processing" really is.
Figuring out where to base the cache was also a question for me. Like you have
found out, if you do it at too high of a level then we'll hit synchronization
issues. If I put it at too low of a level, then it turned out to be useless.
I was actually thinking of scoping the cache to an EntityManager (broker)
instance. Maybe not as useful as across all active brokers, but we would still
gain a sizeable benefit (hopefully).
Those are my initial thoughts. To be honest, I haven't completely grasped your
proposed changes, so I don't have any specific comments on your changes yet...
Kevin
> Cache SQL (or closer precursors to SQL) more aggressively
> ---------------------------------------------------------
>
> Key: OPENJPA-407
> URL: https://issues.apache.org/jira/browse/OPENJPA-407
> 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: 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.