Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 5052EB5DBF6 for ; Fri, 24 Jun 2011 13:29:47 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 21626-01 for ; Fri, 24 Jun 2011 16:29:41 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from server515.appriver.com (server515f.exghost.com [72.32.253.82]) by mail.postgresql.org (Postfix) with ESMTP id 31E27B5DBEA for ; Fri, 24 Jun 2011 13:29:40 -0300 (ADT) X-Note-AR-ScanTimeLocal: 6/24/2011 11:27:23 AM X-Policy: GLOBAL - riskcontrollimited.com X-Policy: GLOBAL - riskcontrollimited.com X-Policy: GLOBAL - riskcontrollimited.com X-Primary: harry.mantheakis@riskcontrollimited.com X-Note: This Email was scanned by AppRiver SecureTide X-ALLOW: @riskcontrollimited.com ALLOWED X-Virus-Scan: V- X-Note: Spam Tests Failed: X-Country-Path: PRIVATE->PRIVATE->UNITED STATES->UNITED STATES X-Note-Sending-IP: 72.32.49.6 X-Note-Reverse-DNS: X-Note-WHTLIST: harry.mantheakis@riskcontrollimited.com X-Note: User Rule Hits: X-Note: Global Rule Hits: G200 G201 G202 G203 G207 G208 G219 G309 X-Note: Encrypt Rule Hits: X-Note: Mail Class: ALLOWEDSENDER X-Note: Headers Injected Received: from [72.32.49.6] (HELO FE2.exchange.rackspace.com) by server515.appriver.com (CommuniGate Pro SMTP 5.4.1c) with ESMTP id 279674730; Fri, 24 Jun 2011 11:27:23 -0500 Received: from FE11.exchange.rackspace.com ([192.168.1.63]) by FE2.exchange.rackspace.com with Microsoft SMTPSVC(6.0.3790.4675); Fri, 24 Jun 2011 11:29:39 -0500 Received: from [192.168.20.134] ([87.194.70.108]) by FE11.exchange.rackspace.com with Microsoft SMTPSVC(6.0.3790.4675); Fri, 24 Jun 2011 11:29:39 -0500 Message-ID: <4E04BB75.4070403@riskcontrollimited.com> Date: Fri, 24 Jun 2011 17:29:41 +0100 From: Harry Mantheakis User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-GB; rv:1.9.2.18) Gecko/20110616 Lightning/1.0b2 Thunderbird/3.1.11 MIME-Version: 1.0 To: Kevin Grittner CC: Claudio Freire , pgsql-performance@postgresql.org Subject: Re: Long Running Update References: <4E035649.20007@riskcontrollimited.com> <4E0472AB.9090507@riskcontrollimited.com> <4E0462FA020000250003EBB8@gw.wicourts.gov> In-Reply-To: <4E0462FA020000250003EBB8@gw.wicourts.gov> X-TagToolbar-Keys: D20110624172941547 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 24 Jun 2011 16:29:39.0310 (UTC) FILETIME=[E9E8E8E0:01CC328B] X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-10 required=5 tests=BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001 X-Spam-Level: X-Archive-Number: 201106/233 X-Sequence-Number: 44166 Thank you so much for all the feedback, Kevin - much appreciated. I have stopped the all-in-one-go update from executing, and now I am executing a series of statements, each constrained to update no more than 100,000 records at a time. Interesting fact: updating 100,000 rows takes 5 seconds. Quick. I tried updating 1 million rows in one go, and the statement was still running after 25 minutes, before I killed it! So I am now executing an SQL script with almost 800 separate update-statements, each set to update 100K records, and the thing is trundling along nicely. (I am fortunate enough to be surrounded by MatLab users, one of whom generated the 800-statement file in one minute flat!) Many thanks again for all the info. Kind regards Harry Mantheakis London, UK