OutOfMemoryError
friends,
I am retrieving records (500,000 and more) from, one or more, databases using two SQL queries. I compare each record and if it I record the comparison result.
Now I am having following problems
1.How do I write to a file so many records and save myself from getting the above error.
2.How do retrieve Rows in batches or remove few rows from result set once there task is finished.
3.How do I catch OutOfMemoryError without terminating or affecting the memory. is there any way to call garbage collection from my program itself. I have tried using more memory for virtual MC but i think its an temporary solution.

