Streaming large result sets with MySQL
- by configurator
I'm developing a spring application that uses large MySQL tables. When loading large tables, I get an OutOfMemoryException, since the driver tries to load the entire table into application memory.
I tried using
statement.setFetchSize(Integer.MIN_VALUE);
but then every ResultSet I open hangs on close(); looking online I found that that happens…