I have to query a database and result set is very big. I am using MySQL as data base. To avoid the \"OutOfMemoryError\" after a lot of search I got two options:
MySQL
In MySQL connector-j 5.1 implementation notes, they said there are 2 ways to handle this situation.
enter image description here
The 1st is to make the statement retrieve data row by row, the 2nd can support batch retrieve.