Hi all,
I'm relatively new to
Java and have the following problem with accessing a Postgresql database.
I connect to the database and do a select, then iterate over the result set and build objects from the data. This works without a problem when the select returns only a few rows, but when I get a really large result (ca. 380,000 rows) I always get an OutOfMemoryError.
I googled some and found that I should increase the heap size, but either this does not help or I am doing it wrong.
The relevant part of my code looks like this:
Regarding the heap size: I am using NetBeans 6.5 under SuSE Linux. I edited the netbeans.conf so that the memory related default options look like this:
-J-Xss2m -J-Xms256m -J-XX:PermSize=128m -J-XX:MaxPermSize=1024m
What am I doing wrong? There has to be an easy way to do this.
[Sorry, if this appears twice, I had some problems submitting it.]