Re: PGStream.ReceiveTupleV3 and Out of Memory

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "digifork" <digifork(at)gmail(dot)com>,<pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: PGStream.ReceiveTupleV3 and Out of Memory
Date: 2011-04-27 18:20:03
Message-ID: 4DB81803020000250003CF4E@gw.wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

digifork <digifork(at)gmail(dot)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

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Dave Cramer 2011-04-27 18:23:02 Re: PGStream.ReceiveTupleV3 and Out of Memory
Previous Message digifork 2011-04-27 17:59:48 PGStream.ReceiveTupleV3 and Out of Memory