Re: COPY versus INSERT

Поиск
Список
Период
Сортировка
От alex b.
Тема Re: COPY versus INSERT
Дата
Msg-id 3EC26FED.1040803@gmx.de
обсуждение исходный текст
Ответ на Re: COPY versus INSERT  ("alex b." <mailinglists1@gmx.de>)
Список pgsql-general
alex b. wrote:
>
>> Almost always.
>>
>> Might want to try batching your INSERTs into transactions of a few
>> hundred-few thousand first though - that frequently helps a lot:
>>
>> BEGIN;
>> INSERT ...1
>> INSERT ...2
>> ...
>> INSERT ...999
>> COMMIT;
>>
>
> I have a perl script, that runs a loop, in which it executes a prepared
> INSERT INTO query...
>
> the loop takes about 1 - 2 seconds...
>
> does BEGIN; .... COMMIT;  also apply to some PREPARE-routines?

well, I just tried it, YES IT DOES ALSO APPLY ....




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

Предыдущее
От: Doug McNaught
Дата:
Сообщение: Re: COPY versus INSERT
Следующее
От: Tom Lane
Дата:
Сообщение: Re: - what protocol for an Internet postgres connection