aspose file tools*
The moose likes JDBC and the fly likes Break query execution into multiple steps to reduce the response time 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 "Break query execution into multiple steps to reduce the response time" Watch "Break query execution into multiple steps to reduce the response time" New topic
Author

Break query execution into multiple steps to reduce the response time

Kamal Bahadur
Greenhorn

Joined: Jan 09, 2006
Posts: 3
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
Layne Lund
Ranch Hand

Joined: Dec 06, 2001
Posts: 3061
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


Java API Documentation
The Java Tutorial
Virag Saksena
Ranch Hand

Joined: Nov 27, 2005
Posts: 71
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 ?


<a href="http://www.auptyma.com" target="_blank" rel="nofollow">The Peak of Performance</a>
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Break query execution into multiple steps to reduce the response time