Re: OutOfMemory hibernate scroll with 2M records | Postgresql 8.4 DB - Mailing list pgsql-jdbc

From Thomas Kellerer
Subject Re: OutOfMemory hibernate scroll with 2M records | Postgresql 8.4 DB
Date
Msg-id hgpts7$u9m$1@ger.gmane.org
Whole thread Raw
In response to OutOfMemory hibernate scroll with 2M records | Postgresql 8.4 DB  (Ankit Kumar <ankitk@xebia.com>)
List pgsql-jdbc
Ankit Kumar wrote on 22.12.2009 05:15:
> It appears the driver class is loading all entity objects in memory and
> not releasing them as expected in a scroll operation.

That's documented:

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

Just enable "query based retrieval" and the driver does not load everything into memory.

Thomas

pgsql-jdbc by date:

Previous
From: Craig Ringer
Date:
Subject: Re: OutOfMemory hibernate scroll with 2M records | Postgresql 8.4 DB
Next
From:
Date:
Subject: Re: OutOfMemory hibernate scroll with 2M records | Postgresql 8.4 DB