Thanks to the patch provided by Matthew B. Jones, and improved by Erik-Berndt Scheper, the new Envers ValidTimeAuditStrategy (which will be renamed to ValidityAuditStrategy
in upcoming releases) now leverages the additional information held in the end-revision column when creating queries; they no longer need to use subselects to find an entity at a given revision (JIRA issue HHH-5372).
This means a big performance gain when running the queries (at the cost of the additional column having to be filled). Tests conducted by Matthew B. Jones indicate more than a 10-fold improvement over the old strategy.
If you’d like to check out the new code, it’s available in Hibernate 3.6.0.CR1; the documentation is here. Remember it’s still in an experimental state, but feedback is very welcome!
Adam
comments powered by Disqus