Re: COPY versus INSERT

From: "alex b(dot)" <mailinglists1(at)gmx(dot)de>
To: Richard Huxton <dev(at)archonet(dot)com>
Cc: Postgresql General <pgsql-general(at)postgresql(dot)org>
Subject: Re: COPY versus INSERT
Date: 2003-05-14 16:11:37
Message-ID: 3EC26AB9.7020109@gmx.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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?

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Doug McNaught 2003-05-14 16:12:45 Re: - what protocol for an Internet postgres connection
Previous Message Todd Nemanich 2003-05-14 16:07:24 Questions regarding stored procedures