Note that an open database connection (and cursor) is required for this functionality, use setMaxResult()/set-
FirstResult() if you need offline pagination functionality.
Normally, I would expect "ScrollableResults" to be slower, since a lot more will be going on to make the results scrollable.
setFirstResult/setLastResult gets the database to do some of the work so should be quicker - at least, the Hibernate part should.
What shall I do, I cannot wait 20 seconds only for fetching one records. How can I improve the pagination?
But why Hibernate does not use the SQL-Keyword LIMIT
I have found this:
http://devenphillips.blogspot.com/2008/07/emulatin...mit-and-offset-on-db2-for.html as an alternative to OFFSET.
hmm..but I have to use native SQL instead of HQL and want to avoid this.
Are there any ways to do that with HQL?
Don't get me started about those stupid light bulbs. |