-->
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.  [ 3 posts ] 
Author Message
 Post subject: Query Cache Performance (with OSCache)
PostPosted: Thu May 26, 2005 7:59 pm 
Newbie

Joined: Thu Apr 15, 2004 5:53 pm
Posts: 13
Hibernate version: 2.1.8

Name and version of the database you are using: Oracle 10g

In order to attempt to see some performance gains in part of an application which is performing a lot queries, I turned on L2 Caching. Since the application test suite uses more than one session factory, I gave up on EhCache, which doesn't handle multiple buildsessionfactory calls well; I then tried OSCache, in read-write mode (mostly because the tests create test data) and using the query cache.

Based on the hibernate logs, both L2 caching and query caching seems to be working; much of the data is being served up out of the cache and the number of SQL calls has dropped markedly.

However, it's had next to no impact on the performance of the application. This could imply that the problem wasn't the queries, except this: if, in my DAO, I internally cache a map that can translate from System name (a unique field being used by the finders) to persistent id, the performance improves markedly.

This seems to be the intent of the query cache. The query cache seems to be working, it just doesn't seem to be any faster for me. Any thoughts on why this might be?

_________________
--
Geoffrey Wiseman


Top
 Profile  
 
 Post subject: More Information
PostPosted: Thu May 26, 2005 9:11 pm 
Newbie

Joined: Thu Apr 15, 2004 5:53 pm
Posts: 13
Although I don't have the information to back it up yet, it seems as if a lot of time is going into autoFlushIfNecessary() before running the queries even when the query cache is on and nothing has changed; does this make sense? It also seems true that FlushMode.NEVER during the duration of this area of the application doesn't result in the kind of significant performance improvements that adding our own cache on top of Hibernate does; again, somewhat disappointing.

_________________
--
Geoffrey Wiseman


Top
 Profile  
 
 Post subject: FlushMode
PostPosted: Fri May 27, 2005 5:45 pm 
Newbie

Joined: Thu Apr 15, 2004 5:53 pm
Posts: 13
FlushMode.NEVER seems to result in dramatically increased performance; yesterday's attempt wasn't done correctly. Pleasing.

_________________
--
Geoffrey Wiseman


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

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.