Hi, you should notice already that repeating the same query a second time is dramatically faster then the first execution: many caches especially at query level are applied transparently. Unless you use projections, the results are then extracted and transformed in Hibernate identifiers to load objects from the database, at this point any hibernate second level cache will help as well, but to have Search use it you'll need a recent version.
There's also the option to define filters: filters are cacheable, and you can transform any executed Query in a filter to reuse it: see QueryWrapperFilter.
_________________ Sanne http://in.relation.to/
|