| From: | Ron Johnson <ron(dot)l(dot)johnson(at)cox(dot)net> |
|---|---|
| To: | pgsql-general(at)postgresql(dot)org |
| Subject: | Re: SQL Diff ? |
| Date: | 2007-08-26 03:10:19 |
| Message-ID: | 46D0EF1B.6010303@cox.net |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 08/25/07 21:51, Kevin Kempter wrote:
> Hi List;
>
> I have a very large table (52million rows) - I'm creating a copy of it to rid
> it of 35G worth of dead space, then I'll do a sync, drop the original table
> and rename table2.
What is your definition of "dead space"?
Bad rows, duplicate rows, old rows? Something else?
> Once I have the table2 as a copy of table1 what's the best way to select all
> rows that have been changed, modified in table1 since the initial laod from
> table1 into table2?
>
> Also I'll need to delete any rows in table2 that no longer remain in table1.
>
> There is no change date column
> I could do something like select * from table1 where col1 || col2 || col3 etc
> not in (select col1 || col2 || col3 etc from table2)
>
> but this would be ineffecient & slow.
>
> Anyone have a suggestion to do this in an efficient manner?
>
> Thanks in advance
- --
Ron Johnson, Jr.
Jefferson LA USA
Give a man a fish, and he eats for a day.
Hit him with a fish, and he goes away for good!
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
iD8DBQFG0O8bS9HxQb37XmcRAsWdAJoDI/WvdaGSO7CUkUa74xHoRgycIwCguLXv
Msw0TdJyYI4keoq+ofu4j3c=
=Gi/f
-----END PGP SIGNATURE-----
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Kevin Kempter | 2007-08-26 03:21:09 | Re: SQL Diff ? |
| Previous Message | Kevin Kempter | 2007-08-26 02:51:59 | SQL Diff ? |