ResultSet: Retrieving column values by index versus retrieving by label
问题 When using JDBC, I often come across constructs like ResultSet rs = ps.executeQuery(); while (rs.next()) { int id = rs.getInt(1); // Some other actions } I asked myself (and authors of code too) why not to use labels for retrieving column values: int id = rs.getInt("CUSTOMER_ID"); The best explanation I've heard is something concerning performance. But actually, does it make processing extremely fast? I don't believe so, though I have never performed measurements. Even if retrieving by label