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

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Preferred usage for 'copy to' for a subset of data
Дата
Msg-id 21873.1189746106@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Preferred usage for 'copy to' for a subset of data  ("Jason L. Buberel" <jason@buberel.org>)
Список pgsql-general
"Jason L. Buberel" <jason@buberel.org> writes:
> 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';

Surely the latter will be faster, since it doesn't bother to store all
the data in a server temp table.

            regards, tom lane

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

Предыдущее
От: "Jason L. Buberel"
Дата:
Сообщение: Preferred usage for 'copy to' for a subset of data
Следующее
От: Stefan Schwarzer
Дата:
Сообщение: Re: Database/Table Design for Global Country Statistics