Re: COPY versus INSERT - Mailing list pgsql-general

From Doug McNaught
Subject Re: COPY versus INSERT
Date
Msg-id m3r871ebe4.fsf@varsoon.wireboard.com
Whole thread Raw
In response to COPY versus INSERT  ("Jay O'Connor" <joconnor@cybermesa.com>)
List pgsql-general
"alex b." <mailinglists1@gmx.de> writes:

> 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?

If you have autocommit turned on (which I believe is the default for
DBD::Pg) each INSERT will cause a transaction commit, whether the
query is prepared or not.

-Doug

pgsql-general by date:

Previous
From:
Date:
Subject: Re: Schedule Jobs in Postgres
Next
From: "alex b."
Date:
Subject: Re: COPY versus INSERT