Suppose to have a ResultSet rs
with n
object.
This code:
while(rs.next()) {
// do something on rs
}
is algoritmically equal to this code (i.e. both gave the same result):
for(i=1; i<=n; i++) {
rs.absolute(i)
// do something on rs
}
But are this equivalant on terms of throughouts? Is the first faster? Or, for a given i
, rs.next() is just a wrapper for rs.absolute(i+1)
?
Best regards MC