Re: java.lang.OutOfMemoryError

Поиск
Список
Период
Сортировка
От Barry Lind
Тема Re: java.lang.OutOfMemoryError
Дата
Msg-id 3E3FED75.4030709@xythos.com
обсуждение исходный текст
Ответ на java.lang.OutOfMemoryError  (Paul Cullum <pcullum@N-able.com>)
Ответы Re: java.lang.OutOfMemoryError
Список 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
>




В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Barry Lind
Дата:
Сообщение: Re: problem with currency symbol in rs.getString
Следующее
От: Barry Lind
Дата:
Сообщение: Re: 7.3 compability, select * from myfunc();