From: | Barry Lind <blind(at)xythos(dot)com> |
---|---|
To: | Paul Cullum <pcullum(at)N-able(dot)com> |
Cc: | pgsql-jdbc(at)postgresql(dot)org |
Subject: | Re: java.lang.OutOfMemoryError |
Date: | 2003-02-04 16:42:29 |
Message-ID: | 3E3FED75.4030709@xythos.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
Paul,
A patch was just applied to cvs head to better deal with this. The new
behavior is that by default you get the old behavior, but if you call
setFetchSize() it will turn on using cursors to incrementally fetch the
result.
thanks,
--Barry
PS. I haven't yet got a new build for the web site, but should in a few
days, so in the meantime, if you want to try this out, you will need to
build from cvs sources.
Paul Cullum wrote:
> I'm querying a table that has nearly 3 million records in it and when I
> call executeQuery() I get an a java.lang.OutOfMemoryError message. My
> immediate thought was that it was strange that a safe fetch size wasn't
> used automatically so I then I decided to explicitly the fetch size by
> calling the Connection classes setFetchSize() method. Apparently this
> is not implemented in the pg73jdbc3.jar driver. I am surprised that
> the default fetch size is so great as to cause an OutOfMemoryError. What
> is the proper method for using JDBC to query result sets which are
> potentially large?
>
> Thanks,
> Paul
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/users-lounge/docs/faq.html
>
From | Date | Subject | |
---|---|---|---|
Next Message | Barry Lind | 2003-02-04 16:47:56 | Re: problem with currency symbol in rs.getString |
Previous Message | Rafal Kedziorski | 2003-02-04 16:00:30 | Which driver? |