Re: why autocommit mode is slow?

Поиск
Список
Период
Сортировка
От Vick Khera
Тема Re: why autocommit mode is slow?
Дата
Msg-id BANLkTi=NdWUiG5nNqYpi0duAFgK--P=arA@mail.gmail.com
обсуждение исходный текст
Ответ на why autocommit mode is slow?  (Szymon Guz <mabewlun@gmail.com>)
Список pgsql-general
On Thu, Apr 7, 2011 at 4:59 PM, Szymon Guz <mabewlun@gmail.com> wrote:
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.

as others have said, there is overhead in each transaction.  the biggest of these is the file sync to disk of the write-ahead log.  on spinning media this involves on average one rotation of the platter.  when you batch the inserts, you save that sync per insert.

В списке pgsql-general по дате отправления:

Предыдущее
От: Gipsz Jakab
Дата:
Сообщение: PostgreSQL + FreeBSD memory configuration, and an issue
Следующее
От: Vick Khera
Дата:
Сообщение: Re: PostgreSQL + FreeBSD memory configuration, and an issue