Re: Comparing two (largish) tables on different servers

Поиск
Список
Период
Сортировка
От Michael Fuhr
Тема Re: Comparing two (largish) tables on different servers
Дата
Msg-id 20041110193250.GA18174@winnie.fuhr.org
обсуждение исходный текст
Ответ на Re: Comparing two (largish) tables on different servers  (Sam Mason <sam@samason.me.uk>)
Список pgsql-sql
On Wed, Nov 10, 2004 at 09:18:21AM +0000, Sam Mason wrote:
> 
>   mkfifo db1
>   psql -h "db1" -t -q -c "$query" > db1
>   mkfifo db2
>   psql -h "db2" -t -q -c "$query" > db2
>   diff -u -0 db1 db2

This should work for small data sets, but the OP said the tables
were about 5G.  Unless you use a cursor, psql will fetch the entire
result before writing anything.  Also, some implementations of diff
might read all of the data from one file before reading much from
the other file, especially if the files have differences.  Hope
you have lots of memory....

-- 
Michael Fuhr
http://www.fuhr.org/~mfuhr/


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

Предыдущее
От: "Goutam Paruchuri"
Дата:
Сообщение: Re: Error In connection ??
Следующее
От: Stefan Weiss
Дата:
Сообщение: Re: A transaction in transaction? Possible?