From: | Adrian von Bidder <avbidder(at)fortytwo(dot)ch> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: continuous copy/update one table to another |
Date: | 2010-03-01 09:51:00 |
Message-ID: | 201003011051.06026@fortytwo.ch |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hi Terry,
On Sunday 28 February 2010 22.56:41 Terry wrote:
> I am looking for a way to copy all the data from one table to another
> on a regular basis, every 5 minutes let's say.
>
> INSERT INTO table2 SELECT * FROM table1;
Why do you want this? Is it necessary for the data in table2 to appear only
delayed?
I usually try to avoid all scheduled actions and try to use a "push" or
"pull" model where data is replicated / generated when needed or when it is
generated by the last step. So to replicate (a part of the) data into a 2nd
table, I'd usually go for triggers, or try to avoid having the data
duplication alltogether.
(But obviously, I don't know what you're doing, this is just my opinion
based on a feeling that the underlying problem you're solving might be
solved in a more elegant way.)
cheers
-- vbi
--
Pzat!
From | Date | Subject | |
---|---|---|---|
Next Message | Darryl Pye | 2010-03-01 10:19:31 | Cannot remove prepared statement. |
Previous Message | Adrian von Bidder | 2010-03-01 09:43:31 | Optimizer: ranges and partial indices? Or use partitioning? |