Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 7FEF69FC068 for ; Thu, 28 Jun 2007 02:41:15 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 77992-08 for ; Thu, 28 Jun 2007 02:41:12 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 1177E9FC066 for ; Thu, 28 Jun 2007 02:41:11 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.1/8.14.1) with ESMTP id l5S5fALK021073; Thu, 28 Jun 2007 01:41:10 -0400 (EDT) To: Chris cc: Pgsql performance Subject: Re: update query taking too long In-reply-to: <46834124.5010600@gmail.com> References: <46834124.5010600@gmail.com> Comments: In-reply-to Chris message dated "Thu, 28 Jun 2007 15:03:32 +1000" Date: Thu, 28 Jun 2007 01:41:10 -0400 Message-ID: <21072.1183009270@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200706/611 X-Sequence-Number: 25644 Chris writes: > I'm trying to do an update of a reasonably large table and it's taking > way too long so I'm trying to work out why and if I need to tweak any > settings to speed it up. Any foreign keys leading to or from that table? 3.5 million row updates are not exactly gonna be instantaneous anyway, but only FK checks or really slow user-written triggers would make it take upwards of an hour ... regards, tom lane