Re: why autocommit mode is slow?

From: Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Cc: Szymon Guz <mabewlun(at)gmail(dot)com>
Subject: Re: why autocommit mode is slow?
Date: 2011-04-07 21:55:17
Message-ID: 201104071455.17805.adrian.klaver@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(dot)klaver(at)gmail(dot)com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Rob Sargent 2011-04-07 22:03:43 Re: PostgreSQL backend process high memory usage issue
Previous Message Shianmiin 2011-04-07 21:52:05 Re: PostgreSQL backend process high memory usage issue