Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Regarding paging and caching!!

 
Ravi Kumar Ravuru
Ranch Hand
Posts: 176
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 219
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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???
 
Ravi Kumar Ravuru
Ranch Hand
Posts: 176
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Nagendra Prasad,
Please tell me the solutions for both options.
Regards,
Ravi
 
SJ Adnams
Ranch Hand
Posts: 925
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
which database are you using?
 
Ravi Kumar Ravuru
Ranch Hand
Posts: 176
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Simon Lee,
Iam using Oracle Database.Please help me out.
Regards,
Ravi
 
SJ Adnams
Ranch Hand
Posts: 925
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 219
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic