Received: from localhost (unknown [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id C4C269FC33E for ; Tue, 30 Oct 2007 02:28:05 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 99655-03-5 for ; Tue, 30 Oct 2007 02:26:48 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.168]) by postgresql.org (Postfix) with ESMTP id 457B39FBEF7 for ; Tue, 30 Oct 2007 02:19:43 -0300 (ADT) Received: by ug-out-1314.google.com with SMTP id j3so48715ugf for ; Mon, 29 Oct 2007 22:19:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=apqhrcGPE81Ig2uAoty8M9qqGooE/i8OaIhpxRiHCX8=; b=S39veAUu+Qratunby2BMR8PSMr3uC+iDX0mXe17TO3caijSV84hv4B6Br1V9EKhi8jr6+AG9JH8j3X7MY9JpTmt+NEvbJ6nGXEZTnvGQnbrygOwFEH3MkRnOH/FXVYREipCmC0aL1EsH2tAfg+vPpHPGskkiBxIAFUCmlDnok+Q= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=f3fB0wjAsT6MnL4c6Eg9zaP5RJGQQPn7k9HFLdxfYL+m4Jw6IJl0ZY1I2PvH7duMPWvlEF/PFCNvSqAFgxJW4iXboQc1jnyTQ1g7iTEaPOhJ8rv89tY89WUc6wimpFD8Wmf7ktblkTtReUZ+YXQi+VRZGNas5RM/jD3D15dxlO8= Received: by 10.67.15.8 with SMTP id s8mr411106ugi.1193721582730; Mon, 29 Oct 2007 22:19:42 -0700 (PDT) Received: by 10.67.40.10 with HTTP; Mon, 29 Oct 2007 22:19:42 -0700 (PDT) Message-ID: Date: Tue, 30 Oct 2007 00:19:42 -0500 From: "Scott Marlowe" To: "Campbell, Lance" Subject: Re: Suggestions on an update query Cc: "Gregory Stark" , "Joshua D. Drake" , pgsql-performance@postgresql.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20071026141547.70c9c1e0@scratch> <87odel1feo.fsf@oxford.xeocode.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200710/349 X-Sequence-Number: 27371 On 10/29/07, Campbell, Lance wrote: > Thanks for all of your help. The problem was that the result_entry table > had some constraints that pointed to a third table. When I removed > those constraints the performance was amazing. The update took less > than seven minutes to execute. I did not even consider the fact that > constraints to another table would impact the performance. Usually you can put an index on the refrerenced key in the foreign table to speed things up.