Search Postgresql Archives

Re: why autocommit mode is slow?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Apr 7, 2011 at 4:59 PM, Szymon Guz <mabewlun@xxxxxxxxx> 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.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux