Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 328679FBA4A for ; Tue, 7 Aug 2007 10:58:26 -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 26105-10 for ; Tue, 7 Aug 2007 10:58:10 -0300 (ADT) X-Greylist: delayed 00:12:41.775725 by SQLgrey-1.7.5 Received: from higgs.elka.pw.edu.pl (higgs.elka.pw.edu.pl [194.29.160.5]) by postgresql.org (Postfix) with ESMTP id 6D1049FBB1B for ; Tue, 7 Aug 2007 10:58:16 -0300 (ADT) Received: from hadron.elka.pw.edu.pl ([194.29.160.27]:54478 "EHLO localhost") by higgs.elka.pw.edu.pl with ESMTP id S10246AbXHGNpb (ORCPT ); Tue, 7 Aug 2007 15:45:31 +0200 Received: from higgs.elka.pw.edu.pl ([194.29.160.5]) by localhost (hadron [194.29.160.27]) (amavisd-new, port 251) with ESMTP id 04131-02-52 for ; Tue, 7 Aug 2007 15:45:20 +0200 (CEST) Received: from mion.elka.pw.edu.pl ([194.29.160.35]:56612 "EHLO mion.elka.pw.edu.pl") by higgs.elka.pw.edu.pl with ESMTP id S10183AbXHGNo0 (ORCPT ); Tue, 7 Aug 2007 15:44:26 +0200 Received: from cpb226.neoplus.adsl.tpnet.pl ([83.31.207.226]:43641 "EHLO cpb226.neoplus.adsl.tpnet.pl" ident: "TIMEDOUT" smtp-auth: "pkolaczk" TLS-CIPHER: "DHE-RSA-AES256-SHA keybits 256/256 version TLSv1/SSLv3" TLS-PEER-CN1: ) by mion.elka.pw.edu.pl with ESMTPSA id S108787AbXHGNo0 (ORCPT ); Tue, 7 Aug 2007 15:44:26 +0200 X-Comment: RFC 2476 MSA function at mion.elka.pw.edu.pl logged sender identity as: pkolaczk From: Piotr =?iso-8859-2?q?Ko=B3aczkowski?= To: pgsql-performance@postgresql.org Subject: Re: Update table performance Date: Tue, 7 Aug 2007 15:44:17 +0200 User-Agent: KMail/1.9.7 References: <435532.80672.qm@web32210.mail.mud.yahoo.com> In-Reply-To: <435532.80672.qm@web32210.mail.mud.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200708071544.17399.P.Kolaczkowski@elka.pw.edu.pl> X-Virus-Scanned: by AmaVisD-new at elka.pw.edu.pl X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.001 tagged_above=0 required=5 tests=BAYES_50=0.001 X-Spam-Level: X-Archive-Number: 200708/100 X-Sequence-Number: 26230 Hi, update valley set test='this is a test' Such query updates ALL of your records in the table. 5 million records * 47 fields - that can be several gigabytes of data. The system has to scan that gigabytes to change every record. This is a huge task. Try vacuuming and see if it helps. It can help a lot, if you perform such 'whole table updates' often. Best regards, Piotr Kolaczkowski