Received: from localhost (unknown [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 9695A9F9B44 for ; Sat, 1 Sep 2007 14:28:33 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 47980-06 for ; Sat, 1 Sep 2007 14:28:29 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from mail.xmtservices.net (unknown [66.224.65.210]) by postgresql.org (Postfix) with SMTP id 030389F9896 for ; Sat, 1 Sep 2007 14:28:29 -0300 (ADT) Received: (qmail 18175 invoked from network); 1 Sep 2007 17:28:28 -0000 Received: from unknown (HELO boffin.xmtservices.net) (192.168.0.23) by errol.xmtservices.net with SMTP; 1 Sep 2007 17:28:28 -0000 Date: Sat, 1 Sep 2007 10:29:47 -0700 From: Shawn To: pgsql-performance@postgresql.org Subject: Slow Query Message-ID: <20070901102947.0c0a50a3@boffin.xmtservices.net> X-Mailer: Claws Mail 2.10.0 (GTK+ 2.10.13; i686-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200709/4 X-Sequence-Number: 26549 Hello, I have a recurring script that updates some tables from an MS_SQL server. One of the operations sets a field in all records to null in preparation of being updated with values from the other server. The SQL statement is: update shawns_data set alias = null; Alias is a type varchar(8) The table has 26 fields per record and there are about 15,700 records. The server hardware is a dual QUAD-CORE Intel 2 GHz XEON dell 2950 server with 4 drive SAS RAID-5 array, and 16G of RAM. The OS is Slackware 11 with some updatews and Postgres v8.2.4 built from source. Even after VACUUM this simple line takes 35 sec to complete. Other more complicated deletes and updates, some of the tables in this database are over 300 million records, take as much time as this simple query. My question: Is there a better, ie. faster, way to do this task? Shawn