This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JDBC and the fly likes Large ResultSet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Large ResultSet" Watch "Large ResultSet" New topic

Large ResultSet

Pappu Kumar
Ranch Hand

Joined: Oct 01, 2002
Posts: 69
I have a query that returns anywhere from 1000 to 5000 rows. I have to show them to one screen (no paging). What are the ways in which i can get the best time performance. Let me know what i can do at Database, Server or whats the best Java technology that would gimme the best performance.
Jamie Robertson
Ranch Hand

Joined: Jul 09, 2001
Posts: 1879

Save them in an ArrayList and display them in a JTable or such.
I'd hate to be the guy that has to read all 5000 rows!
Loren Rosen
Ranch Hand

Joined: Feb 12, 2003
Posts: 156
You may want to experiment with ResultSet.setFetchSize to see what value is the best.
I agree. Here's the link:
subject: Large ResultSet
Similar Threads
Performance: Horizontal scalability or vertical scalabiltiy
Invoke two stored proceedures parlally
Exception Design
standalone Tomcat 4.0.3
Unmarshall Best Practices