X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 3DC1253B12 for ; Tue, 29 Mar 2005 00:00:43 +0100 (BST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 09374-06 for ; Mon, 28 Mar 2005 23:00:39 +0000 (GMT) Received: from cmailg1.svr.pol.co.uk (cmailg1.svr.pol.co.uk [195.92.195.171]) by svr1.postgresql.org (Postfix) with ESMTP id 0968A53B0B for ; Tue, 29 Mar 2005 00:00:35 +0100 (BST) Received: from modem-2582.leopard.dialup.pol.co.uk ([217.135.154.22] helo=192.168.0.102) by cmailg1.svr.pol.co.uk with esmtp (Exim 4.14) id 1DG3Dm-0005qX-KR; Tue, 29 Mar 2005 00:00:34 +0100 Subject: Re: Delete query takes exorbitant amount of time From: Simon Riggs To: Josh Berkus Cc: Karim Nassar , pgsql-performance@postgresql.org In-Reply-To: <200503250938.28896.josh@agliodbs.com> References: <1111709457.9085.127.camel@k2.cet.nau.edu> <200503242124.39558.josh@agliodbs.com> <1111728955.9085.238.camel@k2.cet.nau.edu> <200503250938.28896.josh@agliodbs.com> Content-Type: text/plain Organization: 2nd Quadrant Date: Mon, 28 Mar 2005 23:59:11 +0100 Message-Id: <1112050751.11750.924.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.0.2 (2.0.2-3) Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.048 tagged_above=0 required=5 tests=AWL, FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200503/618 X-Sequence-Number: 11323 On Fri, 2005-03-25 at 09:38 -0800, Josh Berkus wrote: > > I guess I was wondering if there is other general tuning advice for such > > large table indexes such as increasing statistics, etc. > > If you're going with the drop/load/recreate option, then I'd suggest > increasing work_mem for the duration. Hmmm ... or maintenance_work_mem? > What gets used for FK checks? Simon? > In 8.0, maintenance_work_mem is used for index creation, vacuum and initial check of FK checks at time of creation. Everything else uses work_mem as the limit. Best Regards, Simon Riggs