Re: COPY FROM STDIN instead of INSERT

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: COPY FROM STDIN instead of INSERT
Дата
Msg-id 20061018123229.GB11184@svana.org
обсуждение исходный текст
Ответ на Re: COPY FROM STDIN instead of INSERT  ("Ilja Golshtein" <ilejn@yandex.ru>)
Ответы Re: COPY FROM STDIN instead of INSERT  ("Ilja Golshtein" <ilejn@yandex.ru>)
Re: COPY FROM STDIN instead of INSERT  ("Merlin Moncure" <mmoncure@gmail.com>)
Список pgsql-general
On Wed, Oct 18, 2006 at 04:20:41PM +0400, Ilja Golshtein wrote:
> And my question remains.
> Is it Ok to use COPY BINARY FROM STDIN instead of multiple INSERTs?

The reason why copy is faster is because it doesn't have to
parse/plan/execute all the queries. In exchange you can't use
expressions or joins to fill the table, only raw data.

Binary may be slightly faster because the datum parsing can be
partially skipped, but that's hardly much benefit over a text copy.

Hope this helps,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

Вложения

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

Предыдущее
От: "Ilja Golshtein"
Дата:
Сообщение: Re: COPY FROM STDIN instead of INSERT
Следующее
От: "Ilja Golshtein"
Дата:
Сообщение: Re: COPY FROM STDIN instead of INSERT