Hi!

My colleague rewritten old jsp app to ROO+VAADIN. Such generated application is extremely slow since it fetches data from as400 db2 database with enormous large tables. Currently I'm changing queries to be more db2 friendly but one thing I cant figure:

app settings:
- jt400.jar and AS400DB2 hib. dialect. via datasource configured in tomcat
- os is ubuntu 10.4
- database is AS400 DB2 at iseries5


spring loads data in way it fetches 2 rows per query, so to load an view with paged item list with 100 rows per page, it generates 50 queries for each new page.

in my log i see info about additional queries roo probably use to manage current page:
Hibernate: select count(table0_.COL1) as col_0_0_ from table table0_ fetch first 2 rows only
select count(table0_.COL1) as col_0_0_ from table table0_ fetch first 2 rows only

Where I can change these 2 rows setting to my custom value

Also, designated select has no group by clause so it would always return just one row - so I can't see point of sufix "fetch first 2 rows only".

Thank you very much guys!