Jesper is right, you shouldn't query for data that you are going to throw away unless the performance difference is nominal (such as you were using 99% of the data).
A lot of ppl try to 'play' with result sets as is they are normal
java objects, and you should keep in mind they are not. They are transport objects designed to ship information to/from the database and have their own very special properties. It would be like taking a moving van 'out for a spin on a racetrack'. If you have more specialized needs for the data, get it out of the resultset first into your own optimized data structure. As I mentioned to someone who posted on something similar the other day, its short work to turn a resultset into an array of Hash Maps.
[ July 18, 2007: Message edited by: Scott Selikoff ]