Re: COPY versus INSERT

From: Doug McNaught <doug(at)mcnaught(dot)org>
To: "alex b(dot)" <mailinglists1(at)gmx(dot)de>
Cc: Richard Huxton <dev(at)archonet(dot)com>, Postgresql General <pgsql-general(at)postgresql(dot)org>
Subject: Re: COPY versus INSERT
Date: 2003-05-14 16:33:23
Message-ID: m3r871ebe4.fsf@varsoon.wireboard.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"alex b." <mailinglists1(at)gmx(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message alex b. 2003-05-14 16:33:49 Re: COPY versus INSERT
Previous Message mallah 2003-05-14 16:21:28 Re: Schedule Jobs in Postgres