Re: COPY versus INSERT

From: "alex b(dot)" <mailinglists1(at)gmx(dot)de>
To: Postgresql General <pgsql-general(at)postgresql(dot)org>
Subject: Re: COPY versus INSERT
Date: 2003-05-14 16:33:49
Message-ID: 3EC26FED.1040803@gmx.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 ....

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2003-05-14 16:37:20 Re: - what protocol for an Internet postgres connection
Previous Message Doug McNaught 2003-05-14 16:33:23 Re: COPY versus INSERT