-->
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: Statistics of query cache
PostPosted: Thu Mar 09, 2006 6:36 am 
Newbie

Joined: Tue Feb 07, 2006 2:02 am
Posts: 12
Hi,

I configured everything to use query cache...

here is my code...

Query query1 = session.createQuery("from salegroup where id=123")
.setCacheable(true)
.setCacheMode(CacheMode.NORMAL)
.setCacheRegion("salegrp");

and to test ....

Statistics stats = sessionFactory.getStatistics();
double queryCacheHitCount = stats.getQueryCacheHitCount();
double queryCacheMissCount = stats.getQueryCacheMissCount();
double queryCachePutCount = stats.getQueryCachePutCount();

and the cofig file entry ...

<property name="hibernate.cache.use_query_cache">true</property>
<property name="hibernate.cache.use_second_level_cache">true</property>
<property name="hibernate.generate_statistics">true</property>


the problem is the cache hit....miss...put count is always zero...
it means that query is not cached right...

can anyone please tell me what is the problem.....

_________________
Regards
.....Hiisi.....


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.