You problem description is a bit vague so I cannot give the siver bullet answer ;-)
First thing to do is to make sure that the Hibernate layer is your bottleneck. You cannot optimize an application with statements like "I thought that..." You've got to find the bottleneck, optimize it, find the new bottleneck etc.
I would start with DB profiling, get the most time consuming queries. If they are fast but are issued too often, you might want to look at 2nd level cache, query optimisations, association level batchs... If they are slow, ask for the query plan and check that it uses the indexes as you expect.
If you're using cache, make sure that it's correctly sized. If cache entries are evicted as soon as they get in, the cache becomes a performance hit. If you're not using cache, use it !
|