Hi all,
This might sound crazy but I need some inputs on the hibernate pagination.
I presume that by using the methods
sqlquery.setMaxResults
sqlquery.setFirstResult
we can achive pagination. But the question remains is that these methods will take into effect after the ResultSet is fetched from the database. Corerct me if I am wrong.
This means that the query might be fetching 10,000 records but these filters will be applied upon these 10,000 records and then a small subset will be returned back to the user.
Is there any way that we can fetch only limited number of records and achieve maximum response time?
|