Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Large ResultSet

 
Pappu Kumar
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1879
MySQL Database Suse
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 156
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You may want to experiment with ResultSet.setFetchSize to see what value is the best.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic