title: Conversion of resultset to Java model slow for a million records
body: <p>This is what my code looks like. The query executes in less than a minute, but the while loop takes more than 2 hours to finish! I have around 800,000 records. Can you please let me know the best way to save in the reportModelList. I can even switch to Hibernate if required. </p>
  
  <pre><code>PreparedStatement ps =connection.prepareStatement(sql);
  ResultSet rs = ps.executeQuery();
  try{
  while (rs.next()) {
  ReportModel t = new ReportModel();
  t.set1(rs.getDate(1));
  t.set2(rs.getDouble(2));
  ...
  ...
  t.set60(rs.getString(60));
  reportModelList.add(t)
  
  }}finally {
  DbUtils.closeQuietly(rs);
  }
  </code></pre>