Re: autocommit (true/false) for more than 1 million records

Поиск
Список
Период
Сортировка
От David Johnston
Тема Re: autocommit (true/false) for more than 1 million records
Дата
Msg-id CAKFQuwYaGZmpv6ZxNqifs0DNw2y_-Pf2CcR55zuK8fACjr0eMw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: autocommit (true/false) for more than 1 million records  (Emi Lu <emilu@encs.concordia.ca>)
Список pgsql-performance



On Mon, Aug 25, 2014 at 9:40 AM, Emi Lu <emilu@encs.concordia.ca> wrote:

By the way, could someone let me know why set autocommit(false) is for sure faster than true please? Or, some online docs talk about this.


​Not sure about the docs specifically but:

Commit is expensive because as soon as it is issued all of the data has to be guaranteed written.  ​While ultimately the same amount of data is guaranteed by doing them in batches there is opportunity to achieve economies of scale.

(I think...)
When you commit you flush data to disk - until then you can make use of RAM.  Once you exhaust RAM you might as well commit and free up that RAM for the next batch.

David J.

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

Предыдущее
От: Emi Lu
Дата:
Сообщение: Re: autocommit (true/false) for more than 1 million records
Следующее
От: Felipe Santos
Дата:
Сообщение: Re: autocommit (true/false) for more than 1 million records