aspose file tools*
The moose likes JDBC and the fly likes Regarding paging and caching!! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Regarding paging and caching!!" Watch "Regarding paging and caching!!" New topic
Author

Regarding paging and caching!!

Ravi Kumar Ravuru
Ranch Hand

Joined: Apr 18, 2002
Posts: 176
Hello Folks,
There are one lakh records in the database.I need to display 10 records at a time in a page with navigation between the pages(next/previous).There will be multiple users accessing the same.What are the solutions for the above problem which i could follow without performance degradation?Please help me out.
Regards,
Ravi
Nagendra Prasad
Ranch Hand

Joined: Jul 11, 2002
Posts: 219
Are these 100000 static records or are these bound to be changing all the time? i.e is the table read only or would the users be performing updates as well???


Best Regards,<br />Nagendra Prasad.
Ravi Kumar Ravuru
Ranch Hand

Joined: Apr 18, 2002
Posts: 176
Hello Nagendra Prasad,
Please tell me the solutions for both options.
Regards,
Ravi
SJ Adnams
Ranch Hand

Joined: Sep 28, 2001
Posts: 925
which database are you using?
Ravi Kumar Ravuru
Ranch Hand

Joined: Apr 18, 2002
Posts: 176
Hello Simon Lee,
Iam using Oracle Database.Please help me out.
Regards,
Ravi
SJ Adnams
Ranch Hand

Joined: Sep 28, 2001
Posts: 925
ok this is what i use. it will be no good if you are applying paging to a huge resultset.
I do the order, then reverse order in order to get the preceeding and following number of results displayed (in the jsp) & for setting up the forward back buttons.
works fine for me (~5000 records)
no caching is involved.
(in MSSQL & MySQL paging is easier i think.)
Nagendra Prasad
Ranch Hand

Joined: Jul 11, 2002
Posts: 219
IF the recors in the table are static....
- Then you could 'provide' paging by performing queries for the next 'n' or previous 'n' records by performing explicit queries on the db. (id between x and y type).

If the records are changing all the time, it gets a bit complicated... 100000 records is a huge data set..and memory intensive.. u would have to devise a method here.. how much do you want to retrieve from the server... can ur server handle storage of such huge objects in session memory?
If u definitely want to implement in this form, then you can look at using scrollabe result sets or iterate through a collection.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Regarding paging and caching!!