balaji wrote:
hi
i ported my existing application to hibernate sucessfully . but i'm getting out of memory error frequently . i turned on second level caching as well as query caching . i'm using ehcache provider with cache-usage ="read-only" . i also enable setcacheable(true) for my queries .
but still my performance is horrible .
whats the difference b/w making a query cacheable and turning on Second level caching ?.
whether turning on cache-usage on Collecion (Set) will improve my performance .?
what else i'm missing here .
kindly help me in this .
thanks
Balaji
Are you running long transactions? If so, that'll cause Hibernate to continue to suck up memory. Look into session.evict() or session.clear()
query cache -Query result sets may also be cached. This is only useful for queries that are run frequently with the same parameters.
Where second level cache isn't based on a query.