From: | Christophe Pettus <xof(at)thebuild(dot)com> |
---|---|
To: | Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com> |
Cc: | Daniele Varrazzo <daniele(dot)varrazzo(at)gmail(dot)com>, 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:59:50 |
Message-ID: | 65BA67E3-7F95-4DE4-B4FD-755A253B12A1@thebuild.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | psycopg |
> On Dec 23, 2016, at 16:58, Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com> wrote:
> I understood it did:
>
> http://initd.org/psycopg/docs/usage.html#transactions-control
>
> "It is possible to set the connection in autocommit mode: this way all the commands executed will be immediately committed and no rollback is possible. A few commands (e.g. CREATE DATABASE, VACUUM...) require to be run outside any transaction: in order to be able to run these commands from Psycopg, the connection must be in autocommit mode: you can use the autocommit property (set_isolation_level() in older versions)."
My somewhat garbled thought was that each of the component INSERTs in the .executemany would be getting its own transaction unless the connection was set to autocommit... but I'll admit I haven't tested it.
--
-- Christophe Pettus
xof(at)thebuild(dot)com
From | Date | Subject | |
---|---|---|---|
Next Message | Adrian Klaver | 2016-12-24 01:02:20 | Re: speed concerns with executemany() |
Previous Message | Adrian Klaver | 2016-12-24 00:58:18 | Re: speed concerns with executemany() |