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

Reply via email to