Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id EAC08B5DBD2 for ; Fri, 8 Jul 2011 06:20:14 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 69324-05; Fri, 8 Jul 2011 09:20:09 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wy0-f174.google.com (mail-wy0-f174.google.com [74.125.82.174]) by mail.postgresql.org (Postfix) with ESMTP id 86074B5DBF4; Fri, 8 Jul 2011 06:20:08 -0300 (ADT) Received: by wyg8 with SMTP id 8so1170668wyg.19 for ; Fri, 08 Jul 2011 02:20:07 -0700 (PDT) Received: by 10.216.79.74 with SMTP id h52mr455970wee.38.1310116807827; Fri, 08 Jul 2011 02:20:07 -0700 (PDT) Received: from moltowork.localnet ([86.47.169.233]) by mx.google.com with ESMTPS id em16sm2302101wbb.67.2011.07.08.02.20.06 (version=SSLv3 cipher=OTHER); Fri, 08 Jul 2011 02:20:06 -0700 (PDT) From: Vincent de Phily To: "French, Martin" Cc: pgsql-general@postgresql.org, pgsql-performance@postgresql.org Subject: Re: [PERFORM] DELETE taking too much memory Date: Fri, 08 Jul 2011 11:20:14 +0200 Message-ID: <6960221.CJCJgSSb5M@moltowork> Organization: Mobile Devices User-Agent: KMail/4.6.0 (Linux/2.6.38.4; KDE/4.6.4; x86_64; ; ) In-Reply-To: <81976671721DF04B9DCA6ECD87941A402B31E830@roundway.Cromwell-tools.co.uk> References: <81976671721DF04B9DCA6ECD87941A402B31E830@roundway.Cromwell-tools.co.uk> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.13 tagged_above=-5 required=5 tests=BAYES_00=-1.9, RCVD_IN_SORBS_WEB=0.77 X-Spam-Level: X-Archive-Number: 201107/219 X-Sequence-Number: 177598 On Thursday 07 July 2011 19:54:08 French, Martin wrote: > How up to date are the statistics for the tables in question? > > What value do you have for effective cache size? > > My guess would be that planner thinks the method it is using is right > either for its current row number estimations, or the amount of memory > it thinks it has to play with. Not very up to date I'm afraid (as shown by the low estimate of deleted rows). Table t2 has been insert-only since its re-creation (that's another story), while t1 is your classic insert-many, update-recent. We haven't tweaked effective cache size yet, it's on the TODO... like many other things :/ -- Vincent de Phily