title: Why is reading a JDBC ResultSet by position faster than by name and how much faster?
body: <p><a href="http://in.relation.to/2018/12/06/hibernate-orm-600-alpha1-out/" rel="noreferrer">Announcing Hibernate 6</a> the Hibernate team claims that by switching from
  read-by-name to read-by-position in JDBC <a href="https://docs.oracle.com/javase/8/docs/api/java/sql/ResultSet.html" rel="noreferrer">ResultSet</a> they gain a performance benefit.</p>
  <blockquote>
  <p>High-load performance testing showed that Hibernate’s approach of
  reading values from ResultSet by name to be its most limiting factor
  in scaling through-put.</p>
  </blockquote>
  <p>Does that mean they are changing calls from  <a href="https://docs.oracle.com/javase/8/docs/api/java/sql/ResultSet.html#getString-java.lang.String-" rel="noreferrer"><code>getString(String columnLabel)</code></a> to <a href="https://docs.oracle.com/javase/8/docs/api/java/sql/ResultSet.html#getString-int-" rel="noreferrer"><code>getString(int columnIndex)</code></a>?</p>
  <p>Why is this faster?</p>
  <p>As <code>ResultSet</code> is an interface doesn't performance gain depend on the JDBC driver implementing it?</p>
  <p>How big are the gains?</p>