Re: PGStream.ReceiveTupleV3 and Out of Memory - Mailing list pgsql-jdbc

From Kevin Grittner
Subject Re: PGStream.ReceiveTupleV3 and Out of Memory
Date
Msg-id 4DB81803020000250003CF4E@gw.wicourts.gov
Whole thread Raw
In response to PGStream.ReceiveTupleV3 and Out of Memory  (digifork <digifork@gmail.com>)
List pgsql-jdbc
digifork <digifork@gmail.com> wrote:

> When I start the query, it takes some time to return the first
> row. When the query is about to return the first row, there is a
> giant spike in heap memory use and the the JVM runs out of memory.

Unless you go out of your way to prevent it, the entire result set
is cached on the heap during invocation of the execute method.  You
can avoid this by using a cursor:

http://jdbc.postgresql.org/documentation/head/query.html#query-with-cursor

-Kevin

pgsql-jdbc by date:

Previous
From: digifork
Date:
Subject: PGStream.ReceiveTupleV3 and Out of Memory
Next
From: Dave Cramer
Date:
Subject: Re: PGStream.ReceiveTupleV3 and Out of Memory