MySQL Large ResultSet java.lang.OutOfMemoryError Workaround
Posted by Kelvin on 04 Mar 2010 | Tagged as: programming
Ever tried to fetch all rows from a large MySQL table?
You’re bound to hit up against a java.lang.OutOfMemoryError.
So you try searching for how to set the fetchSize, and of course, it doesn’t quite work.
The MySQL JDBC Driver implementation notes states:
By default, ResultSets are completely retrieved and stored in memory. In most cases [...]
