Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

ResultSet JavaBean

 
Kevin P Smith
Ranch Hand
Posts: 362
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I'm looking for ways to improve the speed of my SQL search and was thinking JavaBeans might do it.

I have had a little look rounf tinternet to see how to do it, only thing is I'm not sure if I can put all of the results into one BEan or if I need to create a new Bean for each line of the results?

Is there a way of creating an array of get/set for one Bean or wil i need to create a new instance of the Bean each time.
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JavaBeans won't improve the speed of your SQL.
You'll use them to store the db records (usually one bean per record), and arrange them a convenient way for you to retrieve them. For example, using a primary key as the key of a Map.
 
Chengwei Lee
Ranch Hand
Posts: 884
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If the database that you're using allows for indexes creation, then you should probably being using indexes to speed things up. Index the columns that are used in the WHERE clause.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic