Hi

On 2015-02-09 02:21 PM, Steve McLeod wrote:
         final ResultSet resultSet = conn.prepareStatement("SELECT * FROM 
foobar").executeQuery();
         int rowCount = 0;
         while (resultSet.next()) {
             rowCount++;
             final int columnCount = resultSet.getMetaData().getColumnCount();
             for (int column = 1; column <= columnCount; column++) {
                 final String columnName = 
resultSet.getMetaData().getColumnName(column);
                 final int anInt = resultSet.getInt(columnName);
             }
         }

You should rather be retrieving the column names once, and then retrieving the result-set columns using the getXXX(int columnIndex) methods.

The only other thing I can think of that might speed it up would be to modify the current caching code to use a TreeMap with a custom comparator and then set the comparator to java.lang.String.CASE_INSENSITIVE_ORDER.
That would avoid the extra String object creation, at the very least.

Regards, Noel.

--
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.

Reply via email to