7 Replies Latest reply on Oct 20, 2010 9:15 AM by Adam Warski

    Performance problem with envers

    Srinivas Nandina Newbie

      Hi,

       

      While loading an object graph of audited data using envers large number of queries are issued.

       

      Suppose there is a class A having a collection of class B and B is having a collection of class C.

      When revision instance of Class A is queried, envers is loading collection B and collection C using "extra-lazy" fetch.

       

      Let's say if instance of A has 100 instances of B and each instance of B has 10 instances of C, then the total number of queries is:

      1 (load A) + 1 (load primary keys of collection B) + 100 (load instance of B) + 100 (load primary keys of collection C) + 1000 (load instances of collection C) = 1202 queries.

      These many number of queries are killing and the resonse time is in the order of minutes.

       

      Is there a way to force envers to use "lazy" fetch instead of "extra-lazy" to overcome the performance issue?

       

      Thanks in Advance,

       

      Srinivas Nandina