Re: Efficient Way to Merge Two Large Tables

Поиск
Список
Период
Сортировка
От Ben Chobot
Тема Re: Efficient Way to Merge Two Large Tables
Дата
Msg-id 5E2BEA57-1A1A-485D-B443-163DD0E5BFA1@silentmedia.com
обсуждение исходный текст
Ответ на Efficient Way to Merge Two Large Tables  (Joshua Rubin <jrubin@esoft.com>)
Ответы Re: Efficient Way to Merge Two Large Tables  (Joshua Rubin <jrubin@esoft.com>)
Список pgsql-general
On Jul 13, 2010, at 1:46 PM, Joshua Rubin wrote:

> Hi,
>
> I have two tables each with nearly 300M rows. There is a 1:1
> relationship between the two tables and they are almost always joined
> together in queries. The first table has many columns, the second has
> a foreign key to the primary key of the first table and one more
> column. It is expected that for every row in table1, there is a
> corresponding row in table2. We would like to just add the one column
> to the first table and drop the second table to allow us to index this
> extra column.

Stupid question before you do this: is there a reason the design was split like this? For instance, if the table with
theid and the single field get updated a lot, while the other table almost never changes, maybe this design isn't so
bad.

В списке pgsql-general по дате отправления:

Предыдущее
От: Joshua Rubin
Дата:
Сообщение: Efficient Way to Merge Two Large Tables
Следующее
От: "Joshua D. Drake"
Дата:
Сообщение: Re: Atul.Goel@globaldatapoint.com