-->
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: QueryCache: bad test results
PostPosted: Sat May 20, 2006 2:00 am 
Newbie

Joined: Thu Apr 06, 2006 1:02 pm
Posts: 4
I run some tests, single table, surrogate ID, natural TEXT, loop of 100,000 iterations, session was not closed nor cleared nor flushed inside a loop, simple SELECT statement (by natural ID, as described in Docs).

Q: Why Hibernate can't retrieve cached Entity from first-level cache?

Bad test results with EhCache, about 15% of performance increase (should be 300%?). Database contains 10,000 records, all 'immutable'. Nothing wrong with test case: HSQLDB installed locally (see below), single thread, session opened before the loop and closed after...

I got following:
QueryCache enabled: 260 seconds
QUeryCache disabled: 290 seconds
(don't remember exactly...)

Q: Why plain SQL sent via JDBC, compiled and running, performs almost the same as QueryCache? I tested it even with Hashtable and OSCache, results are similar.

A: HSQLDB has a Very Good Cache!!!


Of course I forgot to mention network latency, and opponents may
say: we need QueryCache for remote databases!

Unfortunately network latency does not play any role for multithreaded
applications.

Consider single statement, it runs 3 ms, and latency is 30ms.
For 100,000 queries, running by 100 threads, it will be
Total: 300 sec + 30 ms
(or, probably, 200 sec + 60 ms)
- 'network latency' simply dissolves during long multiprocessing...

===========
Hibernate 3.1.3


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.