java.lang.OutOfMemoryError: Java heap space
Posted by: Yashodhan Kholgade
Date: October 10, 2009 08:10PM

I am trying to do "select * from table". This table has more than 500000 rows. When I do preparedStatement.executeQuery() or statement.executeQuery(...) following error is printed.

I tried to do setFetchSize(10000), however it was none of use.

Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
at com.mysql.jdbc.MysqlIO.nextRow(
at com.mysql.jdbc.MysqlIO.getResultSet(
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(
at com.mysql.jdbc.Connection.execSQL(
at com.mysql.jdbc.PreparedStatement.executeQuery(
at com.Table.grabTableData(
at com.Metadata.readTableMetricsBySchema(
at com.GrabDB.main(

Please help me to solve this error ASAP.

Options: ReplyQuote

Written By
java.lang.OutOfMemoryError: Java heap space
October 10, 2009 08:10PM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.