X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 88C9F3A566A for ; Mon, 24 Jan 2005 23:38:40 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 03372-04 for ; Mon, 24 Jan 2005 23:38:34 +0000 (GMT) Received: from smtp12.wanadoo.fr (smtp12.wanadoo.fr [193.252.22.20]) by svr1.postgresql.org (Postfix) with ESMTP id 790A93A5AAA for ; Mon, 24 Jan 2005 23:32:23 +0000 (GMT) Received: from me-wanadoo.net (localhost [127.0.0.1]) by mwinf1206.wanadoo.fr (SMTP Server) with ESMTP id AD7AA1C0008A for ; Tue, 25 Jan 2005 00:32:20 +0100 (CET) Received: from locked.myftp.org (AGrenoble-203-1-6-124.w81-50.abo.wanadoo.fr [81.50.46.124]) by mwinf1206.wanadoo.fr (SMTP Server) with SMTP id 6CA161C00085 for ; Tue, 25 Jan 2005 00:32:20 +0100 (CET) X-ME-UUID: 20050124233220445.6CA161C00085@mwinf1206.wanadoo.fr Subject: Re: update from multiple rows From: mrblonde@locked.myftp.org To: franco@akyasociados.com.ar Cc: pgsql-sql@postgresql.org Content-Type: text/plain; X-Mailer: locked.myftp.org writer Message-Id: <20050124233220.6CA161C00085@mwinf1206.wanadoo.fr> Date: Tue, 25 Jan 2005 00:32:20 +0100 (CET) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.228 tagged_above=0 required=5 tests=FORGED_RCVD_HELO, NO_REAL_NAME X-Spam-Level: X-Archive-Number: 200501/232 X-Sequence-Number: 20020 Thanks a lot.. That is what i searched.. In fact your query is very good for little changes, but i will have to use another method when updating all my rows because the performance is not very good alas. My data set contains something like 40000 rows to update in 1+ million records and data_raw, data_sys are of type "real"... The complete update took 40 minutes on a 256Mo, athlon 2400, kernel 2.6 and with no charge during the execution of the query. Is this normal ? The number of columns of the table does it matter a lot (the table contains 12 reals and 4 integers) ? I found that using an intermediate table which stock for every row the value before and the value after helps to gain speed... But it is not a very nice way i think.. Thanks again :) Etienne