X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 6BA6C5650E for ; Wed, 9 Mar 2005 15:03:26 +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 42026-02 for ; Wed, 9 Mar 2005 15:03:21 +0000 (GMT) Received: from wolff.to (wolff.to [66.93.249.74]) by svr1.postgresql.org (Postfix) with SMTP id 790E456522 for ; Wed, 9 Mar 2005 15:03:20 +0000 (GMT) Received: (qmail 7318 invoked by uid 500); 9 Mar 2005 15:19:18 -0000 Date: Wed, 9 Mar 2005 09:19:18 -0600 From: Bruno Wolff III To: Ricardo =?iso-8859-1?Q?Valen=E7a?= de Assis Cc: pgsql-admin@postgresql.org Subject: Re: Slow Update Message-ID: <20050309151918.GA7213@wolff.to> Mail-Followup-To: Bruno Wolff III , Ricardo =?iso-8859-1?Q?Valen=E7a?= de Assis , pgsql-admin@postgresql.org References: <003101c52316$bd8e4f00$8c0aa8c0@rram> <422EDF21.4080903@tinet.org> <006401c524b6$82277940$1b00280a@ugf.br> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <006401c524b6$82277940$1b00280a@ugf.br> User-Agent: Mutt/1.5.6i X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.008 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200503/126 X-Sequence-Number: 16624 On Wed, Mar 09, 2005 at 11:44:33 -0300, Ricardo Valença de Assis wrote: > Hi everydoby! > > I have a table with more than 26000 rows and I need to use update a > column of this tables on all lines according with a column. So, I need to > use update 26000 times correct? I tried to use a this command: > "UPDATE database SET column1=0 WHERE column2 in (VARIABLES)", where > VARIABLES is the list separeted by commas. But the list has about 26000 > entries, so I got a message of too long parameters. Is there a way to use > UPDATE pushing values from a file? Is there a way to run update more faster? > It is taking about 10 seconds for each UPDATE... Does anyone knows another > form to do this task? If you really want to do this for all rows in the table just do: UPDATE tablename SET column1=0; > > ----- Original Message ----- > From: "Daniel Rubio" > To: > Sent: Wednesday, March 09, 2005 8:33 AM > Subject: Re: [ADMIN] Too many clients----A big problem for my team Why did you include this message that had nothing to do with your question?