large number of DB writes: java heap space problem in using transaction-commit
I'm writing a program that will be applied on a large DB (my DB server is mysql 5.1). My program has lots of updates and inserts. In order to decrease execution time I use "start transaction" and "commit" after every specific number of DB writes. My code is very efficient for small databases (for example having 200,000 records). But in larger databases (even as large as 1,000,000 records) JVM encounters a fetal error and the program terminates.
The error message is something about java heap space:
8192000 bytes requested from GrEt in growableArray.cpp
out of swap space...
I wonder what this problem is! I'm not creating any object in the code and I don't think using transactions make use of java Heap!
I also tried conn.setAutocommit(false) and conn.commit instead of direct commands for transaction start and commit but still the same problem exists.
changing the number of commands per transaction does not work also..
Would you please help me? :)
Thanks in advance,