Re: Please help - tks

From: Joel Burton <joel(at)joelburton(dot)com>
To: Mr OCP <mr_ocp(at)yahoo(dot)com>
Cc: <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Please help - tks
Date: 2001-10-18 17:55:50
Message-ID: Pine.LNX.4.30.0110181354190.4883-100000@temp.joelburton.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)joelburton(dot)com | joelburton.com | aim: wjoelburton
Independent Knowledge Management Consultant

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Brett W. McCoy 2001-10-18 18:24:07 Re: "Can't Find any tables, sequences or indexes!" Message
Previous Message Tom Lane 2001-10-18 17:55:33 Re: Freeing Connections