Re: Please help - tks - Mailing list pgsql-admin

From Joel Burton
Subject Re: Please help - tks
Date
Msg-id Pine.LNX.4.30.0110181354190.4883-100000@temp.joelburton.com
Whole thread Raw
In response to Please help - tks  (Mr OCP <mr_ocp@yahoo.com>)
List pgsql-admin
On Thu, 18 Oct 2001, [iso-8859-1] Mr OCP wrote:

> Hi Folks
>
> We have about 300,000 records to update, I have
> created a file with the ids of the records to be
> updated, since the number of records to be updated is
> very large, the update statement takes forever and
> server slows down dramatically, therefore I want to do
> one at a time.
>
> Do you guys have any script which may update records
> one by one using the file that lists these records. I
> am running postgresql sever under Unix, any kind of
> script would do, whether its a perl, bash or sql
> whatever script
>
> Thanks for your help
> Mike

On the really Q&D, can you split (man split) your ID
file into a few pieces, PG COPY this to temp tables (say 10 or 20), and
use these smaller tables for your updates?

--

Joel BURTON  |  joel@joelburton.com  |  joelburton.com  |  aim: wjoelburton
Independent Knowledge Management Consultant


pgsql-admin by date:

Previous
From: Tom Lane
Date:
Subject: Re: Automatically starting postmaster after system crash
Next
From: Tom Lane
Date:
Subject: Re: Freeing Connections