Re: newbie question: processing large database in chunks?



cerios wrote:
When I select * from XX
I'm geting an OutOfMemoryError. I'm using JDBC with Mysql,
and calls like:
ResultSet rs = dbc.executeQuery("select * from thetable");

Try to add JVM parametar -Xmx1000m
It suggest JVM to use 1GB heap for data.
Initial heap is to small (8 MB)
If your table is more than 1GB large you definitly shouldn't use select * statement without where clause due to performance problem.



-- Mladen Adamovic http://home.blic.net/adamm .



Relevant Pages