You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-user@db.apache.org by Oystein Grovlen - Sun Norway <Oy...@Sun.COM> on 2006/04/03 12:12:37 UTC

Re: [SELECT][RESULTSET] How Derby deals with very large select ?

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