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 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Pagination " Watch "Pagination " New topic


Ingudam Manoranjan
Ranch Hand

Joined: Jul 31, 2006
Posts: 48
I have been looking around for implementing pagination. Most of the literature point out to getting the whole records from the Database into the memory and display pagination. However I am looking at 2 level pagination, one at UI level and other at getting fix set of records from Database.

For example, I might want to show to the user only 10 records per page but would like to retrieve say about 100 records only from the database, even if the select query matches more that , say, 300 records. Getting all the 300 records at one go will be costly. So I was thinking of having another level of pagination where a parameter will specify how many records to be retrieved from the database.

I would be grateful for any help or pointers for best practices surrounding such requirement.

Ingudam Manoranjan
Remko Strating
Ranch Hand

Joined: Dec 28, 2006
Posts: 893
This link could help you, which is a summarization of discusions in the past


Remko (My website)
SCJP 1.5, SCWCD 1.4, SCDJWS 1.4, SCBCD 1.5, ITIL(Manager), Prince2(Practitioner), Reading/ gaining experience for SCEA,
Ingudam Manoranjan
Ranch Hand

Joined: Jul 31, 2006
Posts: 48
Thanks Remko. Something like this is exactly what I had been looking for.
I agree. Here's the link:
subject: Pagination
It's not a secret anymore!