aspose file tools*
The moose likes JDBC and the fly likes hi all problem in resultset Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "hi all problem in resultset" Watch "hi all problem in resultset" New topic
Author

hi all problem in resultset

narasimharao konjeti
Ranch Hand

Joined: Apr 26, 2003
Posts: 130
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."
Lu Battist
Ranch Hand

Joined: Feb 17, 2003
Posts: 104
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.
Kishore Dandu
Ranch Hand

Joined: Jul 10, 2001
Posts: 1934
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.


Kishore
SCJP, blog
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: hi all problem in resultset