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

Posted By:   R_K
Posted On:   Sunday, October 20, 2002 08:42 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:   Luis_Untama  
Posted On:   Thursday, October 24, 2002 01:16 PM

1. You should not have any issues on your java program when retrieving any number of records. To test this, run your query and do not create any java beans out of the ResultSet data--just loop through it. It should go quickly. If you see an error, call Oracle. Make sure you have the right driver, then call Oracle. We have had memory issues with older Oracle JDBC classes... but that should not be the case for you.



2. -Xms512m -Xmx512m java options to set to 512 MB (or whatever number you feel is appropriate) initial and max heap size. Look at other java options and use runtime that supports them.



3. I'd like to hear the justification for having 100000 records of anything on an application but that's your business.



4. Why a Vector? Use a better collection.

Re: 100000 records resultset giving problem

Posted By:   Edison_T  
Posted On:   Monday, October 21, 2002 04:57 PM

is it possible for you to get first 1000 records and display those and if the user wants to access then go to the database again to get next set of 1000.
Getting 100,000 records is going to be too heavy.
About | Sitemap | Contact