Bug #14345 select * query on large tables gives OutOfMemoryError
Submitted: 26 Oct 2005 18:41 Modified: 26 Oct 2005 18:51
Reporter: Rahul Palnitkar Email Updates:
Status: Not a Bug Impact on me:
None 
Category:Connector / J Severity:S2 (Serious)
Version:3.1.11 OS:Windows (Windows)
Assigned to: CPU Architecture:Any

[26 Oct 2005 18:41] Rahul Palnitkar
Description:
I have a table with 150,000 records with 10 columns. Wehn I run a select * query from my Java app, I get OutOfMemory error. I can resolve the problem by increasing the heap allocated to JVM. Is there any way to let the ResultSet object use only few records at a time in the local client buffer?

How to repeat:
Call select * again.

Suggested fix:
Specify number of records to be held in the local cursor buffer in the ResultSet
[26 Oct 2005 18:51] Mark Matthews
See http://dev.mysql.com/doc/refman/5.0/en/cj-implementation-notes.html (specifically the "ResultSet" section).