Re: [psycopg] speed concerns with executemany() - Mailing list psycopg

From Christophe Pettus
Subject Re: [psycopg] speed concerns with executemany()
Date
Msg-id 81565B0C-A1A1-4EC9-A733-3D252C9E98C2@thebuild.com
Whole thread Raw
In response to Re: [psycopg] speed concerns with executemany()  (Adrian Klaver <adrian.klaver@aklaver.com>)
Responses Re: [psycopg] speed concerns with executemany()  (Adrian Klaver <adrian.klaver@aklaver.com>)
List psycopg
> On Dec 23, 2016, at 18:55, Adrian Klaver <adrian.klaver@aklaver.com> wrote:
> Alright that I get. Still the practical outcome is each INSERT is being done in a transaction (an implicit one) so
thetransaction overhead comes into play. Or am I missing something? 

Nope, not missing a thing.  The theory (and it is only that) is that when they do the .executemany(), each of those
INSERTspays the transaction overhead, while if they do one big INSERT, just that one statement does. 

--
-- Christophe Pettus
   xof@thebuild.com



psycopg by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: [psycopg] speed concerns with executemany()
Next
From: Jim Nasby
Date:
Subject: Re: [psycopg] speed concerns with executemany()