Re: COPY versus INSERT

Поиск
Список
Период
Сортировка
От alex b.
Тема Re: COPY versus INSERT
Дата
Msg-id 3EC26AB9.7020109@gmx.de
обсуждение исходный текст
Ответ на Re: COPY versus INSERT  (Richard Huxton <dev@archonet.com>)
Ответы Re: COPY versus INSERT
Список pgsql-general
> 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?



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