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
|