db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oystein Grovlen - Sun Norway <Oystein.Grov...@Sun.COM>
Subject Re: [SELECT][RESULTSET] How Derby deals with very large select ?
Date Mon, 03 Apr 2006 10:12:37 GMT
yves pielusenet wrote:

> ho yes ! it is possible so :)
> However I want to be sure that all result data wouldn't be loaded into
> memory (=> OutOfMemory).
> This should be more faster that a :
> for(int i=; i<allrows; i++){
>    mypreparedstatement.setInt(1, i);
>    ResultSet r = myPreparedstatement.execute();
> }

In the embedded case, the amount of memory used by Derby for data is 
determined by the property derby.storage.pageCacheSize.  Default is 1000 
pages in the cache.

Of course, additional memory will be used when you fetch data into Java 
objects (e.g., getString() on a field), but these objects will be 
garbage-collected when you no longer refer to them.

Øystein Grøvlen, Senior Staff Engineer
Sun Microsystems, Database Technology Group
Trondheim, Norway

View raw message