A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
The Software Craftsman
this week in the
Java in General
Kevin P Smith
Joined: Feb 18, 2005
Aug 02, 2006 02:06:00
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.
Joined: Nov 24, 2005
Aug 02, 2006 02:10:00
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.
All roads lead to JavaRanch
Joined: Apr 02, 2004
Aug 03, 2006 01:45:00
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.
SCJP 1.4 * SCWCD 1.4 * SCBCD 1.3 * SCJA 1.0 * TOGAF 8
Have you tried LearnNowOnline?
subject: ResultSet JavaBean
why zero create() methods in entity bean
formatting JSON for jqGrid
Displaying information from a text file in a JTable
getWebApplicationContext() w/ Struts
How to get Connection instance
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015