Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 47FBC6337DC for ; Thu, 7 Jan 2010 11:47:24 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 19237-10 for ; Thu, 7 Jan 2010 15:47:13 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from ews43.everyware.ch (ews43.everyware.ch [212.71.111.43]) by mail.postgresql.org (Postfix) with ESMTP id 5EBCF6336C6 for ; Thu, 7 Jan 2010 11:47:13 -0400 (AST) Received: from mars.lemaco.ch [212.71.105.68] by ews43.everyware.ch with ESMTP (SMTPD32-8.15) id A1FE12DD004E; Thu, 07 Jan 2010 16:47:10 +0100 Message-ID: <4B4601FE.5010300@beecom.ch> Date: Thu, 07 Jan 2010 16:47:10 +0100 From: Leo Mannhart User-Agent: Thunderbird 2.0.0.23 (X11/20090817) MIME-Version: 1.0 To: pgsql-performance@postgresql.org Subject: Re: Massive table (500M rows) update nightmare References: <4B45DE4C.4050606@beecom.ch> <4B45A6FE020000250002DEBC@gw.wicourts.gov> In-Reply-To: <4B45A6FE020000250002DEBC@gw.wicourts.gov> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=3.189 tagged_above=-10 required=5 tests=BAYES_50=0.001, FH_DATE_PAST_20XX=3.188 X-Spam-Level: *** X-Archive-Number: 201001/100 X-Sequence-Number: 36980 Kevin Grittner wrote: > Leo Mannhart wrote: > >> You could also try to just update the whole table in one go, it is >> probably faster than you expect. > > That would, of course, bloat the table and indexes horribly. One > advantage of the incremental approach is that there is a chance for > autovacuum or scheduled vacuums to make space available for re-use > by subsequent updates. > > -Kevin > ouch... thanks for correcting this. ... and forgive an old man coming from Oracle ;) Leo