Closed koelnconcert closed 6 years ago
Remark: Even when streaming results via while (result.next())
, the mysql jdbc driver might still buffer everything in heap beforehand. Activate real streaming via:
// Enable mysql streaming of results: http://dev.mysql.com/doc/connector-j/en/connector-j-reference-implementation-notes.html
Statement stat = conn.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY); stat.setFetchSize(Integer.MIN_VALUE);
Looks like the result set is not streamed but buffered completely in MDS.