Re: [psycopg] speed concerns with executemany()
От | Adrian Klaver |
---|---|
Тема | Re: [psycopg] speed concerns with executemany() |
Дата | |
Msg-id | 62236782-f14e-f035-cb48-671a1a6c3090@aklaver.com обсуждение исходный текст |
Ответ на | Re: [psycopg] speed concerns with executemany() (Christophe Pettus <xof@thebuild.com>) |
Список | psycopg |
On 12/23/2016 04:59 PM, Christophe Pettus wrote: > >> On Dec 23, 2016, at 16:58, Adrian Klaver <adrian.klaver@aklaver.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 committedand 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 usethe 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 transactionunless the connection was set to autocommit... but I'll admit I haven't tested it. Don't you mean?: My somewhat garbled thought was that each of the component INSERTs in the .executemany would be getting its own transaction if the connection was set to autocommit... but I'll admit I haven't tested it. > > -- > -- Christophe Pettus > xof@thebuild.com > -- Adrian Klaver adrian.klaver@aklaver.com
В списке psycopg по дате отправления: