Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 44DAC9FB2CE for ; Tue, 7 Aug 2007 13:03:58 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 19979-02 for ; Tue, 7 Aug 2007 13:03:52 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from skynet.simkin.ca (skynet.simkin.ca [72.51.27.117]) by postgresql.org (Postfix) with ESMTP id 7C91B9FB444 for ; Tue, 7 Aug 2007 13:03:51 -0300 (ADT) Received: from charon.medialogik.com (charon.medialogik.com [72.51.27.114]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by skynet.simkin.ca (Postfix) with ESMTP id 1F3054A54 for ; Tue, 7 Aug 2007 09:03:51 -0700 (PDT) From: Alan Hodgson Organization: Simkin Network Consulting To: pgsql-performance@postgresql.org Subject: Re: Update table performance Date: Tue, 7 Aug 2007 09:03:49 -0700 User-Agent: KMail/1.9.5 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: <200708070903.50096@hal.medialogik.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200708/59 X-Sequence-Number: 26189 On Tuesday 07 August 2007 05:58, Mark Makarowsky wrote: > I have a table with 4,889,820 records in it. The > table also has 47 fields. I'm having problems with > update performance. Just as a test, I issued the > following update: > > update valley set test='this is a test' > > This took 905641 ms. Isn't that kind of slow? PostgreSQL has to write a full new version of every row that gets updated. Updates are, therefore, relatively slow. I'm guessing you're doing this on a single SATA drive, too, which probably doesn't help. -- "If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." -- Somerset Maugham, Author