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 4B4F853676 for ; Fri, 25 Mar 2005 17:39:01 +0000 (GMT) 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 37940-01 for ; Fri, 25 Mar 2005 17:38:56 +0000 (GMT) Received: from davinci.ethosmedia.com (server227.ethosmedia.com [209.128.84.227]) by svr1.postgresql.org (Postfix) with ESMTP id 099ED53492 for ; Fri, 25 Mar 2005 17:38:55 +0000 (GMT) X-EthosMedia-Virus-Scanned: no infections found Received: from [63.195.55.98] (account josh@agliodbs.com HELO spooky) by davinci.ethosmedia.com (CommuniGate Pro SMTP 4.1.8) with ESMTP id 7167080; Fri, 25 Mar 2005 09:40:47 -0800 From: Josh Berkus Organization: Aglio Database Solutions To: Karim Nassar Subject: Re: Delete query takes exorbitant amount of time Date: Fri, 25 Mar 2005 09:38:28 -0800 User-Agent: KMail/1.6.2 Cc: pgsql-performance@postgresql.org References: <1111709457.9085.127.camel@k2.cet.nau.edu> <200503242124.39558.josh@agliodbs.com> <1111728955.9085.238.camel@k2.cet.nau.edu> In-Reply-To: <1111728955.9085.238.camel@k2.cet.nau.edu> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <200503250938.28896.josh@agliodbs.com> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.011 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200503/548 X-Sequence-Number: 11253 Karim, > I guess I was wondering if there is other general tuning advice for such > large table indexes such as increasing statistics, etc. Well, your index use problem is being explained by Tom, Stephan and Simon; basically your FKed data types are incompatible for index use purposes so the system *can't* use an index while loading. 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? -- Josh Berkus Aglio Database Solutions San Francisco