Received: from localhost (unknown [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 14DD22E0304 for ; Mon, 10 Mar 2008 01:15:42 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 59044-03 for ; Mon, 10 Mar 2008 01:15:37 -0300 (ADT) X-Greylist: delayed 00:05:23.724958 by SQLgrey-1.7.5 Received: from pillette.com (adsl-67-119-5-202.dsl.snfc21.pacbell.net [67.119.5.202]) by postgresql.org (Postfix) with ESMTP id 2EC622E02E6 for ; Mon, 10 Mar 2008 01:15:38 -0300 (ADT) Received: (from andrew@localhost) by pillette.com (8.11.6/8.11.6) id m2A4AAd09614; Sun, 9 Mar 2008 20:10:10 -0800 Date: Sun, 9 Mar 2008 20:10:10 -0800 From: andrew@pillette.com Message-Id: <200803100410.m2A4AAd09614@pillette.com> Subject: Re: UPDATE 66k rows too slow To: Miguel Arroz Cc: pgsql-performance@postgresql.org X-Originating-IP: 71.135.73.216 X-Mailer: Webmin 0.940 MIME-Version: 1.0 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.993 tagged_above=0 required=5 tests=FH_HOST_EQ_PACBELL_D=0.893, RDNS_DYNAMIC=0.1 X-Spam-Level: Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Archive-Number: 200803/188 X-Sequence-Number: 29142 Miguel Arroz wrote .. > I'm testing an update on 66k rows on Postgresql, and it seems > something is not right here. > > My server is a Quad-Xeon 3.2 Ghz with 2 GB RAM and a RAID 1 running > FreeBSD 6.3 and PgSQL 8.3. My development machine is a PowerBook G4 > 1.67 Ghz with 2 GB RAM, OS X Leopard and PgSQL 8.3. [62 seconds on server, 25 seconds on much weaker development machine] OK, my guess is that the server's tables are bloated beyond what regular VACUUM can fix. Try a VACUUM FULL VERBOSE or a re-CLUSTER if the tables are clustered. Hope this helps.