Received: from localhost (maia-3.hub.org [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id C51CD9FBDAE for ; Tue, 7 Aug 2007 15:03:30 -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 69725-05-2 for ; Tue, 7 Aug 2007 15:03:14 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from floppy.pyrenet.fr (floppy.pyrenet.fr [194.116.145.2]) by postgresql.org (Postfix) with ESMTP id E6E5F9FBDA7 for ; Tue, 7 Aug 2007 15:03:24 -0300 (ADT) Received: by floppy.pyrenet.fr (Postfix, from userid 106) id 04AE131440; Tue, 7 Aug 2007 20:03:24 +0200 (MET DST) From: Chris Browne X-Newsgroups: pgsql.performance Subject: Re: Update table performance Date: Tue, 07 Aug 2007 14:03:06 -0400 Organization: cbbrowne Computing Inc Lines: 38 Message-ID: <60ps1zgr39.fsf@dba2.int.libertyrms.com> References: <435532.80672.qm@web32210.mail.mud.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Complaints-To: usenet@news.hub.org User-Agent: Gnus/5.1007 (Gnus v5.10.7) XEmacs/21.4.20 (linux) Cancel-Lock: sha1:YfgXjJAqZcdsZwJQSfMp8OySGRo= To: pgsql-performance@postgresql.org X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.369 tagged_above=0 required=5 tests=AWL=0.368, BAYES_50=0.001 X-Spam-Level: X-Archive-Number: 200708/61 X-Sequence-Number: 26191 bedrockconstruction@yahoo.com (Mark Makarowsky) writes: > 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? There > aren't any indexes, triggers, constraints or anything > on this table. The version of Postgres is "PostgreSQL > 8.2.4 on i686-pc-mingw32, compiled by GCC gcc.exe > (GCC) 3.4.2 (mingw-special)". The operating > environment is Windows 2003 Standard Edition w/service > pack 2. It is 2.20 Ghz with 1.0 GB of RAM. Here is > the results from Explain: > > "Seq Scan on valley (cost=0.00..1034083.57 > rows=4897257 width=601)" > > Here are the settings in the postgresql.conf. Any > ideas or is this the expected speed? Hmm. - You asked to update 4,889,820 records. - It's a table consisting of 8.5GB of data (based on the cost info) For this to take 15 minutes doesn't seem particularly outrageous. -- output = ("cbbrowne" "@" "acm.org") http://cbbrowne.com/info/oses.html Rules of the Evil Overlord #65. "If I must have computer systems with publically available terminals, the maps they display of my complex will have a room clearly marked as the Main Control Room. That room will be the Execution Chamber. The actual main control room will be marked as Sewage Overflow Containment."