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?
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.