Index: db/ConnectionHelper.java =================================================================== --- db/ConnectionHelper.java (revision 1166611) +++ db/ConnectionHelper.java (working copy) @@ -77,6 +77,8 @@ protected final DataSource dataSource; private ThreadLocal batchConnectionTl = new ThreadLocal(); + + protected int fetchSize = 10000; /** * @param dataSrc the {@link DataSource} on which this instance acts @@ -101,6 +103,19 @@ } /** + * @param dataSrc the {@link DataSource} on which this instance acts + * @param checkWithUserName whether the username is to be used for the {@link #tableExists(String)} method + * @param block whether the helper should transparently block on DB connection loss (otherwise it throws exceptions) + * @param fetchSize ResultSet fetch size, defaults to 10000, but may be lowered in case of memory problems. + */ + protected ConnectionHelper(DataSource dataSrc, boolean checkWithUserName, boolean block, int fetchSize) { + dataSource = dataSrc; + checkTablesWithUserName = checkWithUserName; + blockOnConnectionLoss = block; + this.fetchSize = fetchSize; + } + + /** * A utility method that makes sure that identifier does only consist of characters that are * allowed in names on the target database. Illegal characters will be escaped as necessary. * @@ -369,7 +384,7 @@ stmt = con.prepareStatement(sql); } stmt.setMaxRows(maxRows); - stmt.setFetchSize(10000); + stmt.setFetchSize(fetchSize); execute(stmt, params); if (returnGeneratedKeys) { rs = stmt.getGeneratedKeys(); Index: db/OracleConnectionHelper.java =================================================================== --- db/OracleConnectionHelper.java (revision 1166590) +++ db/OracleConnectionHelper.java (working copy) @@ -40,7 +40,7 @@ * @param block whether to block on connection loss until the db is up again */ public OracleConnectionHelper(DataSource dataSrc, boolean block) { - super(dataSrc, true, block); + super(dataSrc, true, block, 10); } /**