aspose file tools*
The moose likes JDBC and the fly likes Which is faster? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Which is faster?" Watch "Which is faster?" New topic
Author

Which is faster?

Alok Pota
Ranch Hand

Joined: Mar 07, 2001
Posts: 185
I have a big dataset that I am scrollling thru using the ResultSet like this
while (rs.next()) {
...
if (canUpdate) {
//Update some rows
}
}
In order to update the rows I use JDBC 1.0
by creating a new statement and then updating it
Would it be faster to use JDBC 2.0 programmatic
updates to the result set using
rs.updateRow() method?
Any benchmarks?
I am guessing its faster using the JDBC 2.0 approach.
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

Sounds like the perfect excuse to implement and run the code from this article at O'Reilly. It defines and specifies a proxy for the JDBC classes and adds profiling functionality.
Now you can run the test and tell us the answer!
DOM
 
jQuery in Action, 2nd edition
 
subject: Which is faster?