-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: HQL and L2 cache clarification
PostPosted: Mon Feb 23, 2009 2:24 pm 
Newbie

Joined: Mon Feb 23, 2009 8:28 am
Posts: 1
We wish to turn on the L2 cache on a system which has numerous legacy SQL queries. This raises the problem of stale data in the cache or reading data from the db that has been changed in the cache but not yet flushed.

There are a number of options available, but I was curious to know about exactly how HQL interacts with the L2 cache. I have examined the source code, particularly SessionImpl and it seems that an HQL query performs the following steps:

1. Create query plan.
2. Flush cached query space to db.
3. Translate HQL->SQL and perform query through JDBC

This means that using HQL maintains the consistency of the L2 cache but does not actually read from it.

Please correct me if I am wrong. I have searched for and read many posts related to this but the information is conflicting and I'd like a definitive answer. Thanks!


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.