From: Joseph Shraibman <jks@selectacast.net>
To: Peter Mount <peter@retep.org.uk>
To: pgsql-interfaces@postgreSQL.org <pgsql-interfaces@postgreSQL.org>
Subject: Re: JDBC Large ResultSet problem + BadTimeStamp Patch
Date: Wed, 11 Oct 2000 13:50:06 -0400
Message-ID: <39E4A84E.7741C8C6@selectacast.net> (raw)
References: <Pine.LNX.4.21.0010111707290.8388-100000@maidast.demon.co.uk>
Peter Mount wrote:
>
> On Wed, 11 Oct 2000, Michael Stephenson wrote:
>
> > Two things.
> >
> > Firstly, when dealing with a large ResultSet (about 120000 rows), I get a
> > null pointer exception on the line:
> > wasNullFlag = (this_row[columnIndex - 1] == null);
> > Whenever I call getString(), has anyone else had this? And does anybody
> > have a solution?
>
> Are you getting any out of memory errors at all?
>
> The problem with the current implementation is that it reads the entire
> result into memory, so 120000 rows may be filling up your VM's memory
> (defaults to about 16Mb).
>
> Does it occur if you add the -mx argument to java, ie:
>
> java -mx 64m uk.org.retep.sql.RetepSQL
>
> I'm in the design stage of implementing a version of ResultSet that will
> use cursors, to limit how much is loaded in memory at a time.
>
The problem with that is the same problem I ran into with locking.
cursors need to be in a BEGIN END block, and other calls from different
Statement objects using the same db connectioni will interfere. Make
sure it is clearly documented that that will not be thread safe (unless
postgres gets named locks by then).
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-interfaces@postgresql.org
Cc: jks@selectacast.net, peter@retep.org.uk
Subject: Re: JDBC Large ResultSet problem + BadTimeStamp Patch
In-Reply-To: <39E4A84E.7741C8C6@selectacast.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox