Re: why autocommit mode is slow? - Mailing list pgsql-general

From Adrian Klaver
Subject Re: why autocommit mode is slow?
Date
Msg-id 201104071455.17805.adrian.klaver@gmail.com
Whole thread Raw
In response to why autocommit mode is slow?  (Szymon Guz <mabewlun@gmail.com>)
List pgsql-general
On Thursday, April 07, 2011 1:59:50 pm Szymon Guz wrote:
> Hi,
> this is maybe a stupid question, but I don't know how to explain to my
> coworkers why performing many inserts in autocommit mode is so much slower
> than making all of them in one transaction.
>
> Why is that so slow?

Because autocommit wraps each statement in a transaction versus wrapping all the
statements in one transaction. Transactions have overhead, the more you have the
more time it is going to take.

>
> regards
> Szymon

--
Adrian Klaver
adrian.klaver@gmail.com

pgsql-general by date:

Previous
From: John R Pierce
Date:
Subject: Re: PostgreSQL backend process high memory usage issue
Next
From: Rob Sargent
Date:
Subject: Re: PostgreSQL backend process high memory usage issue