db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stanley Bradbury <Stan.Bradb...@gmail.com>
Subject Re: Large Resultset
Date Tue, 28 Feb 2006 20:07:28 GMT
Zithulele Basil Shange wrote:

> I have a DB (Derby) having 100's thousands of rows. I would like to 
> select row using a condition and be able to page them. The problem is 
> that if I page them in memory I get an outofmemory error or the rowset 
> returns a couple of thousands instead of all the rows matching the 
> condition.
>  
> Is there a way of retrieving a large amount of data rows and be able 
> to page them as well?
>  
> I have tried to limitting the results by setMaxRows but paging them is 
> a problem.
>  
> Regards
> Zithulele

Hi -
I've not implemented a data paging system like yours but the answer to 
your question  is yes,  Derby will allow you to retrieve large amounts 
of data in a ResultSet.  Derby should handle the buffering of data 
between the database and the application without exhausting memory. If 
the outofmemory error happens in derby classes then you will need to 
increase the maxHeap allocated to Java. 

As for paging the data this needs to be handled by the application and 
my guess is this is where your problem lies.  How are you 
constructing/buffering your pages before displaying them?  Is the 
outofmemory error happening in these classes?


Mime
View raw message