Win a copy of Svelte and Sapper in Action this week in the JavaScript 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 all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Break query execution into multiple steps to reduce the response time

Posts: 3
  • Mark post as helpful
  • send pies
  • 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
Ranch Hand
Posts: 3061
  • Mark post as helpful
  • send pies
  • 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.


Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
  • 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 ?
Consider Paul's rocket mass heater.
    Bookmark Topic Watch Topic
  • New Topic