From: Bruno Wolff III <bruno@wolff.to>
To: Ricardo Valença de Assis <valenca@campusvirtual.br>
Cc: pgsql-admin@postgresql.org
Subject: Re: Slow Update
Date: Wed, 9 Mar 2005 09:19:18 -0600
Message-ID: <20050309151918.GA7213@wolff.to> (raw)
In-Reply-To: <006401c524b6$82277940$1b00280a@ugf.br>
References: <003101c52316$bd8e4f00$8c0aa8c0@rram>
<422EDF21.4080903@tinet.org>
<006401c524b6$82277940$1b00280a@ugf.br>
On Wed, Mar 09, 2005 at 11:44:33 -0300,
Ricardo Valença de Assis <valenca@campusvirtual.br> 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" <drubior@tinet.org>
> To: <pgsql-admin@postgresql.org>
> 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?
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: bruno@wolff.to, valenca@campusvirtual.br
Subject: Re: Slow Update
In-Reply-To: <20050309151918.GA7213@wolff.to>
References: <003101c52316$bd8e4f00$8c0aa8c0@rram> <422EDF21.4080903@tinet.org> <006401c524b6$82277940$1b00280a@ugf.br> <20050309151918.GA7213@wolff.to>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox