Preferred usage for 'copy to' for a subset of data

Поиск
Список
Период
Сортировка
От Jason L. Buberel
Тема Preferred usage for 'copy to' for a subset of data
Дата
Msg-id 46EA12FB.8080507@buberel.org
обсуждение исходный текст
Ответы Re: Preferred usage for 'copy to' for a subset of data  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
For recent postgres releases, is there any effective difference (performance/memory/io) between:

create temp table foo as select * from bar where bar.date > '2007-01-01';
copy foo to '/tmp/bar.out';
drop table temp;

and this:

copy ( select * from bar where bar.date > '2007-01-01' ) to '/tmp/bar.out';

...that would lead me to use one method vs. the other on large data sets (1M+ records)?

Just wondering,
Jason

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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: FATAL: could not reattach to shared memory (Win32)
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Preferred usage for 'copy to' for a subset of data