Re: OutOfMemory hibernate scroll with 2M records | Postgresql 8.4 DB

From: Thomas Kellerer <spam_eater(at)gmx(dot)net>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: OutOfMemory hibernate scroll with 2M records | Postgresql 8.4 DB
Date: 2009-12-22 07:52:40
Message-ID: hgpts7$u9m$1@ger.gmane.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message rsmogura 2009-12-22 07:54:48 Re: OutOfMemory hibernate scroll with 2M records | Postgresql 8.4 DB
Previous Message Craig Ringer 2009-12-22 04:49:33 Re: OutOfMemory hibernate scroll with 2M records | Postgresql 8.4 DB