Re: Efficient Way to Merge Two Large Tables - Mailing list pgsql-general

From Joshua Rubin
Subject Re: Efficient Way to Merge Two Large Tables
Date
Msg-id AANLkTimNJGymgddXVXizOd84CSjtGfI1MUPfWP5st_iZ@mail.gmail.com
Whole thread Raw
In response to Re: Efficient Way to Merge Two Large Tables  (Ben Chobot <bench@silentmedia.com>)
List pgsql-general
HI Ben,

> 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.

We just wanted to minimize changes to table1, thats why table2 was
added as a separate table and not a new column. Now we need to index
items in table1 with the column in table2 because some queries are
much too slow and would be sped up greatly with this change. In
retrospect, we should have just added a column to table1. Now, we have
all the data, we just need to move it from table2 to table1.

Thanks,
--
Joshua Rubin

pgsql-general by date:

Previous
From: "Joshua D. Drake"
Date:
Subject: Re: Atul.Goel@globaldatapoint.com
Next
From: Julian Mehnle
Date:
Subject: Re: Efficient Way to Merge Two Large Tables