When you restart using the result set
while (rs.next()){
...
}
To get column data (e.g. long), it’s faster to use
rs.getLong(String columnLabel)
or
rs.getLong(int columnIndex)
Presumably, columnLabel is better used in many ways for stronger code, but are there any significant losses during operation, each time comparing columns with a row (we are talking about table sizes ~ 40 m rows)?
source
share