Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 36A326332AC for ; Tue, 22 Dec 2009 00:49:51 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 44641-01 for ; Tue, 22 Dec 2009 04:49:39 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail.postnewspapers.com.au (202-89-185-120.static.dsl.amnet.net.au [202.89.185.120]) by mail.postgresql.org (Postfix) with ESMTP id BC26E63315C for ; Tue, 22 Dec 2009 00:49:39 -0400 (AST) Received: from localhost (access [127.0.0.1]) by mail.postnewspapers.com.au (Postfix) with ESMTP id 97E851E0443; Tue, 22 Dec 2009 12:49:36 +0800 (WST) X-Virus-Scanned: Debian amavisd-new at postnewspapers.com.au Received: from mail.postnewspapers.com.au ([127.0.0.1]) by localhost (access.postnewspapers.com.au [127.0.0.1]) (amavisd-new, port 10024) with LMTP id Fk-Lz8I7G5WT; Tue, 22 Dec 2009 12:49:34 +0800 (WST) Received: from [10.1.1.6] (124-169-133-89.dyn.iinet.net.au [124.169.133.89]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "Craig Ringer", Issuer "POST Certificate Authority" (verified OK)) by mail.postnewspapers.com.au (Postfix) with ESMTPSA id C25241E044A; Tue, 22 Dec 2009 12:49:34 +0800 (WST) Message-ID: <4B304FDD.2090909@postnewspapers.com.au> Date: Tue, 22 Dec 2009 12:49:33 +0800 From: Craig Ringer User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.1.5) Gecko/20091204 Thunderbird/3.0 MIME-Version: 1.0 To: Ankit Kumar CC: pgsql-jdbc@postgresql.org Subject: Re: OutOfMemory hibernate scroll with 2M records | Postgresql 8.4 DB References: <4B3047E7.9020901@xebia.com> In-Reply-To: <4B3047E7.9020901@xebia.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.598 tagged_above=-10 required=5 tests=AWL=-0.488, BAYES_05=-1.11 X-Spam-Level: X-Archive-Number: 200912/85 X-Sequence-Number: 20166 On 22/12/2009 12:15 PM, Ankit Kumar wrote: > Hi > > I am running a Criteria.scroll() on postgresql on a DB containing 2M > records. The memory keeps increasing and finally it generates an > OutOfMemoryException. Please can you advice how to fix this. Why ask for help if you're just going to ignore the advice you get? You were asked to, when you re-posted to the pgsql-jdbc list, include a self-contained test case and some logging information, which I explained how to get. If you have no respect for the value of the time of the people on this list, why should anybody bother helping you? -- Craig Ringer