]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Add fast execution helper support.
authorMike Bayer <mike_mp@zzzcomputing.com>
Tue, 10 Oct 2017 17:33:59 +0000 (13:33 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Tue, 10 Oct 2017 17:43:35 +0000 (13:43 -0400)
commit4fbeec9d61b6bcbb40ef931b2aa2c82bd6bc8379
tree3339c443406557f1f71d920258565ab0566f7c59
parent2b2cdee7994d4af8dbd3dab28a5588c02e974fc8
Add fast execution helper support.

Added a new flag ``use_batch_mode`` to the psycopg2 dialect.  This flag
enables the use of psycopg2's ``psycopg2.extras.execute_batch``
extension when the :class:`.Engine` calls upon ``cursor.executemany()``.
This extension provides a critical performance increase by over an order of magnitude
when running INSERT statements in batch.  The flag is False by default
as it is considered to be experimental for now.

Change-Id: Ib88d28bc792958d47109f644ff1d08c897db4ff7
Fixes: #4109
doc/build/changelog/migration_12.rst
doc/build/faq/performance.rst
lib/sqlalchemy/dialects/postgresql/psycopg2.py
test/dialect/postgresql/test_dialect.py