Re: COPY versus INSERT - Mailing list pgsql-general

From alex b.
Subject Re: COPY versus INSERT
Date
Msg-id 3EC26AB9.7020109@gmx.de
Whole thread Raw
In response to Re: COPY versus INSERT  (Richard Huxton <dev@archonet.com>)
Responses Re: COPY versus INSERT  ("alex b." <mailinglists1@gmx.de>)
List 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 by date:

Previous
From: "Cris"
Date:
Subject: How many levels a B-tree has?
Next
From: Doug McNaught
Date:
Subject: Re: - what protocol for an Internet postgres connection