Re: continuous copy/update one table to another - Mailing list pgsql-general

From Terry
Subject Re: continuous copy/update one table to another
Date
Msg-id 8ee061011002281707n743f2372xdc7f0d47167cbd8@mail.gmail.com
Whole thread Raw
In response to Re: continuous copy/update one table to another  (John R Pierce <pierce@hogranch.com>)
Responses Re: continuous copy/update one table to another  (John R Pierce <pierce@hogranch.com>)
List pgsql-general
On Sun, Feb 28, 2010 at 6:29 PM, John R Pierce <pierce@hogranch.com> wrote:
> Szymon Guz wrote:
>>
>> Different doesn't mean that the id should be greater or lower, rather
>> should be different. I'd rather do something like:
>
> indeed, my code assumed that records were only INSERT'd into table1 and
> never UPDATE or DELETE'd.  my statement -did- have the advantage of being
> fast, at least assuming the id is an index on both tables.   if you do
> update records, you could use a seperate SERIAL/BIGSERIAL field for this,
> which you update on your INSERT's, and use this bigserial for your inserts,
> but you'd need a UPSERT kind of function to handle duplicate primary keys.
>
> checking for deletions will be more difficult and more importantly, more
> time consuming as it will likely require multiple full table scans of both
> tables.
>
>
>
> --
> Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>

One more question.  This is a pretty decent sized table.  It is
estimated to be 19,038,200 rows.  That said, should I see results
immediately pouring into the destination table while this is running?

pgsql-general by date:

Previous
From: Terry
Date:
Subject: Re: continuous copy/update one table to another
Next
From: John R Pierce
Date:
Subject: Re: continuous copy/update one table to another