| From: | Daniele Varrazzo <daniele(dot)varrazzo(at)gmail(dot)com> |
|---|---|
| To: | Christophe Pettus <xof(at)thebuild(dot)com> |
| Cc: | mike bayer <mike_mp(at)zzzcomputing(dot)com>, "psycopg(at)postgresql(dot)org" <psycopg(at)postgresql(dot)org> |
| Subject: | Re: speed concerns with executemany() |
| Date: | 2016-12-24 00:29:14 |
| Message-ID: | CA+mi_8bRFzam87VLPtqxmF=a8tt5=0RgH6-sK+w1Ae7Yujs4uA@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | psycopg |
On Sat, Dec 24, 2016 at 1:09 AM, Christophe Pettus <xof(at)thebuild(dot)com> wrote:
> Are you running with the transaction isolation level set to ISOLATION_LEVEL_AUTOCOMMIT? If so, each of those INSERTs will be in its own transaction, and thus will go through the COMMIT overhead. That by itself wouldn't explain a jump that large (in most environments), but it will definitely be *much* slower.
Why do you say this? Psycopg doesn't wrap statements in BEGIN/COMMIT
when in autocommit mode. Are you referring about some implicit
transaction created by the database?
-- Daniele
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Adrian Klaver | 2016-12-24 00:58:18 | Re: speed concerns with executemany() |
| Previous Message | Christophe Pettus | 2016-12-24 00:09:36 | Re: speed concerns with executemany() |