• 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
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

Break query execution into multiple steps to reduce the response time

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

I am facing a problem. I have a JSP page which has to display records from a Database. My query retrieves around 1 lakh records. It takes 10 minutes to build the ResultSet. I believe this much of response time is not good for any web based application. Is there any way to retrieve records in multiples of hundreds. so that the response time is reduced.

Thanks and Regards
Kamal
 
Ranch Hand
Posts: 3061
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Does your SQL query sort the records on one of the fields? If so, you could add something to your WHERE clause that narrows it down to a certain range. Something like:

I chose the numbers 0 and 100 as an example. Most likely this would be a "blank" that can be filled in with Java code. Also, depending on the values for sortField, this probably won't guarantee that each result set will return the same number of records.

HTH

Layne
 
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You have a page which displays 100,000 records ?

Would someone ever look at that much data ?

Are you aggregating the data in Java to only provide summaries ?
 
Politics n. Poly "many" + ticks "blood sucking insects". Tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic