File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes pagination strategy Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "pagination strategy" Watch "pagination strategy" New topic

pagination strategy

Pravin Panicker
Ranch Hand

Joined: Oct 05, 2000
Posts: 62
Hello all,
I need to incorporate pagination with a search result.
My query may return upto a lakh records and using Tomcat with db2 7.1
( No ejbs ). What would be appropriate?
- putting the entire search result in session and retrieving them on next/previous
- or hitting the database every next/previous click. Here, I plan to store the primary keys
in session, to optimize my query

Pravin R Panicker<br />SCJP,SCWCD
I agree. Here's the link:
subject: pagination strategy
It's not a secret anymore!