db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Kalén <mka...@apache.org>
Subject PostgreSQL default JDBC fetch size hint
Date Thu, 14 Apr 2005 17:06:22 GMT
Greetings,
  on the user list Andreas Bohnert has pointed out some memory problems
when using the PostgreSQL JDBC driver and a large ResultSet, since
the PostgreSQL JDBC client will fetch _all_ returned rows over the wire
even when the ResulSet is iterated one row at a time with eg
OJB getIteratorByQuery.

See this thread:
  http://www.mail-archive.com/ojb-user%40db.apache.org/msg13380.html

I have done some testing and it seems that explicit setting of the
fetch size (a JDBC hint most drivers will ignore) does not cause
any trouble with the OJB tests. See PB and ODMG results here:
  http://people.apache.org/~mkalen/ojb/postgresql-fetchsize-tests.html

However, making fetchSize=1 a global PostgreSQL default in OJB will
probably cause slightly more network traffic and JDBC overhead so
there might be objections to checking in the new afterStatementCreate
shown on my ASF webpage above.

Any thoughts/comments on this?

Does anyone know if PG7 vs PG8 JDBC-client and/or servers will
do things differently wrt server-side cursors?

Regards,
  Martin

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org


Mime
View raw message