TWO SAME TABLES, ONE UPDATED. HOW TO SYNC THE OTHER? - Mailing list pgsql-general

From L. Berger
Subject TWO SAME TABLES, ONE UPDATED. HOW TO SYNC THE OTHER?
Date
Msg-id 1178942771.095775.95410@e51g2000hsg.googlegroups.com
Whole thread Raw
Responses Re: TWO SAME TABLES, ONE UPDATED. HOW TO SYNC THE OTHER?
List pgsql-general
Hello

I have two tables -- A and B. The structure of both is the same. Only,
B has many indexes and is used for heavy duty SELECTs. On the other
hand, A only accepts heavy duty INSERTs, so has only one primary key
index.

So my DB design is such that A is only an INSERT table. Periodically,
say every 20 minutes or so, I would like to take all the new INSERTs
from table A and put them into B.

Is there any clever command to accomplish this? I'd rather not write a
PHP script with SQL to take every single new record, and update every
column of a new row in table B. For instance, can I do a replication
of only tables, not databases?

Thanks for any pointers!!

LB

--
Conan O' Brien gets it right!
http://blogs.pcworld.com/tipsandtweaks/archives/004369.html


pgsql-general by date:

Previous
From: Jerry
Date:
Subject: Re: xml to db converter
Next
From: Tom Lane
Date:
Subject: Re: Partitioning on IS NULL / IS NOT NULL not supported?