File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes Faster access of ResultSet rows?? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Faster access of ResultSet rows??" Watch "Faster access of ResultSet rows??" New topic

Faster access of ResultSet rows??

Sumanth R Prasad

Joined: Aug 14, 2003
Posts: 6
I have about 100000 records which is returned in a resultset through a query...
I have to scan each row and append the first field onto a file..
Right now, I'm doing this..

The Problem is that the process is taking about 6-7 minutes, which is way too long for my requirement...
Can anyone plz suggest a better (faster) solution ??
Jamie Robertson
Ranch Hand

Joined: Jul 09, 2001
Posts: 1879

a little more info might help.
Which database and which driver are you using? Is this just an SQL dump( no processing, just writing a resultset to a text file )?
Adrian Yan
Ranch Hand

Joined: Oct 02, 2000
Posts: 688
Just out of curiosity, are you querying more than one field? Why just just do a script-based dump? SQL_COMMAND_LINE "select column from table" > result.txt?
I agree. Here's the link:
subject: Faster access of ResultSet rows??
It's not a secret anymore!