I have added setFetchSize/getFetchSize methods to JdbcTemplate in order to allow
override of the default fetchSize set by the JDBC driver. This is used for
executeQuery and can improve query speed dramatically for queries returning a
large number of rows.
I had a query returning 85000 rows, using Oracle, and by setting fetchSize to
100 I cut the time from 85 seconds to 45 seconds. Not bad for a small change
:-)
Thomas
|