This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
hi all, I am getting one problem, while retriving data.. i am retring around one crore records from different(4) tables. and putting into resultset. after some time it is giving OUTOFMEMORYEXCEPTION. i tried with different, options, but no results, could anyone tell the solution for this problem regards nr konjeti
"Unwise to sweat petty stuff, wise to pet sweaty stuff."
Without seeing specific code, I can only give you some general advice. Limit the sql query to not return so much data by adding more to the where clause or by setting a row limit on the results returned. Additionally for large result sets, try to get all your processing done inside the resultset loop so that you don't have to store everything in memory. As a last resort, play with the java -X options for ms and mx that allow more memory.
My first feelings are that you may need to improvize the query to return less than the number of records you are mentioning. 1 crore(ie 10 million) is a large number of records to go through for any kind of programmatic processing. I would suggest you normalize your query to bring the necessary number of entries and do some more normalization on your JDBC resultset area if needed. Kishore.