100000 records resultset giving problem ?
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   R_K
Posted On:   Sunday, October 20, 2002 08:45 AM

Hello All, I am using oracle database, windows 2000, OC4J(Oracle Containers for j2ee) Application Server. When I query a emp table which has 100000 records and store the 100000 records in resultset and using a while loop if I iterates through the resultset to store each emp record in emp bean array then my application hangs at this point so I am unable to form a emp bean array of 100000 records. What is the reason ? Also, I am getting 'OutOfMemoryError' exception at the client side(jsp) when I am trying iterate over a vector that stores each of 100000 emp records as inner vector. I tried to increase my system page file size(virtual memory) to 1GB but this didnt help. So how to avoid this error in windows2000 and on unix box.    More>>
			
Hello All,

I am using oracle database, windows 2000, OC4J(Oracle Containers for j2ee) Application Server. When I query a emp table which has 100000 records and store the 100000 records in resultset and using a while loop
if I iterates through the resultset to store each emp record in emp bean array then my application hangs at this point so I am unable to form a emp bean array of 100000 records. What is the reason ?

Also, I am getting 'OutOfMemoryError' exception at the client side(jsp) when I am trying iterate over a vector that stores each of 100000 emp records as inner vector. I tried to increase my system page file size(virtual memory) to 1GB but this didnt help. So how to avoid this error in windows2000 and on unix box.



Thanks and Regards,
Kumar.
   <<Less

Re: 100000 records resultset giving problem ?

Posted By:   John_Donald  
Posted On:   Wednesday, October 23, 2002 01:15 PM

There is no reason why any application should have to store 100000 records at once in memory. Switch to a more efficient implementation.



Try limiting the query to the interesting entities. If you can't limit the query then process the resultset entries as you come to them. For example if you want to create a list of all data, then write to the outputstream for each resultset entry. after you have written the entry there is no need to store the data in a bean.



Regards.

About | Sitemap | Contact