Win a copy of Murach's MySQL this week in the JDBC and Relational Databases forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Regarding paging and caching!!

 
Ranch Hand
Posts: 176
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 219
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Nagendra Prasad,
Please tell me the solutions for both options.
Regards,
Ravi
 
Ranch Hand
Posts: 925
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
which database are you using?
 
Ravi Kumar Ravuru
Ranch Hand
Posts: 176
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic