Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id EDE9564FD4B for ; Mon, 22 Dec 2008 09:30:35 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 14662-10 for ; Mon, 22 Dec 2008 09:30:33 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id E041464FD14 for ; Mon, 22 Dec 2008 09:30:32 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id mBMDUMMZ007033; Mon, 22 Dec 2008 08:30:23 -0500 (EST) To: Laszlo Nagy cc: Gregory Williamson , "pgsql-performance@postgresql.org" , Daniel Fekete Subject: Re: Slow table update In-reply-to: <494F8DFC.1000001@shopzeus.com> References: <494F749A.5090603@shopzeus.com> <494F7B48.6070204@shopzeus.com> <8B319E5A30FF4A48BE7EEAAF609DB233021F389A@COMAIL01.digitalglobe.com> <494F8DFC.1000001@shopzeus.com> Comments: In-reply-to Laszlo Nagy message dated "Mon, 22 Dec 2008 13:54:20 +0100" Date: Mon, 22 Dec 2008 08:30:22 -0500 Message-ID: <7032.1229952622@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200812/190 X-Sequence-Number: 32226 Laszlo Nagy writes: >> If the table has some sort of FK relations it might be being slowed by >> the need to check a row meant to be deleted has any children. >> > If you look at my SQL, there is only one column to be updated. That > column has no foreign key constraint. That was not the question that was asked. > My other idea was that there are so many indexes on this table, maybe > the update is slow because of the indexes? Updating indexes is certainly very far from being free. How many is "many"? regards, tom lane