TWO SAME TABLES, ONE UPDATED. HOW TO SYNC THE OTHER?

Поиск
Список
Период
Сортировка
От L. Berger
Тема TWO SAME TABLES, ONE UPDATED. HOW TO SYNC THE OTHER?
Дата
Msg-id 1178942771.095775.95410@e51g2000hsg.googlegroups.com
обсуждение исходный текст
Ответы Re: TWO SAME TABLES, ONE UPDATED. HOW TO SYNC THE OTHER?  (rdeleonp@gmail.com)
Список 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 по дате отправления:

Предыдущее
От: Jerry
Дата:
Сообщение: Re: xml to db converter
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Partitioning on IS NULL / IS NOT NULL not supported?