when I used LIMIT and OFFSET parameter in my ejbselect , the excution of select is quiet slowly
the dynamic ql looks like:
select Object(g) from Account g ORDER BY g.id OFFSET ?1 LIMIT ?2"
My JBOSS is 3.2 version
In version 3.0.7 I also had made some modification about "JDBCAbstractQueryCommand.java" to fufill the
function of "LIMIT" AND "OFFSET". It perform better than that in jboss 3.2.
By my test, in the "JDBCAbstractQueryCommand.java" of 3.2 . the time is mainly cost by get "resultset", I mean It will cost a lot of time when preparestatement excuted the query. In 3.0.7 ,It only cost a little time. Does any body
can give me some resonable explaination. I have attached my modification file in 3.0.7. It is almost same as the form in 3.2.
thanks in advance.
by the way: in the account table, there are more than
30000 rows,I have indexed the id column