Re: why autocommit mode is slow?

From: Dann Corbit <DCorbit(at)connx(dot)com>
To: 'Szymon Guz' <mabewlun(at)gmail(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: why autocommit mode is slow?
Date: 2011-04-07 21:05:47
Message-ID: 87F42982BF2B434F831FCEF4C45FC33E421B5D37@EXCHANGE.corporate.connx.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

It has nothing to do with autocommit and everything to do with batching them together.

For instance, if you run ten update queries in autocommit mode I would expect it to take exactly the same time as:

Begin
Exec Query1
Commit

Begin
Exec Query10
Commit

From: pgsql-general-owner(at)postgresql(dot)org [mailto:pgsql-general-owner(at)postgresql(dot)org] On Behalf Of Szymon Guz
Sent: Thursday, April 07, 2011 2:00 PM
To: pgsql-general(at)postgresql(dot)org
Subject: [GENERAL] why autocommit mode is slow?

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?

regards
Szymon

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Merlin Moncure 2011-04-07 21:22:22 Re: PostgreSQL backend process high memory usage issue
Previous Message Szymon Guz 2011-04-07 20:59:50 why autocommit mode is slow?