Hi,

Postgres (for example) don't use cursors on default. The PG jdbc driver loads the entire ResultSet all at once and keeps it in memory! So, even if you do a getIteratorByQuery the memory load on a large resultset is huge!

You can get around this, if you set the fetchsize on the jdbc statement
for example:
           stmt = con.createStatement();
           stmt.setFetchSize(1);
           ResultSet rs = stmt.executeQuery(sql);

This actually forces the jdbc driver to use a cursor and browse the resultset one by one.

There is no possibility to do this with ojb's getIteratorByQuery! Or is there?

thanks,
andreas





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to