1 Reply Latest reply on Nov 20, 2007 11:15 PM by Andy Gibson

    performance of EntityQuery

    Mark Wigmans Newbie

      I generated my JBoss seam application with 'seam generate-entities' and noticed the following:
      - Every time I walk thru a table (via paging) a sql query count(*) from <table? is performed.

      For tables with a large amount of data this count(*) is time consuming. I already notices that there are no hints for count queries (for caching the result via hibernate).

      Is there another way to overcome the problem that for every page a count(*) call is done on the database?

        • 1. Re: performance of EntityQuery
          Andy Gibson Newbie

          If your backing bean is stateful then it re-uses the current value of the result count each time unless the parameters have changed. Check to see if your backing bean is stateful, and if it is, trace through the getResultCount method to see why it is being recalculated each time.

          Cheers,

          Andy