]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Add "render_nulls" flag to bulk_insert as optional performance optimization
authortsauerwein <tobias.sauerwein@camptocamp.com>
Tue, 12 Apr 2016 03:16:17 +0000 (23:16 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Mon, 6 Jun 2016 20:22:11 +0000 (16:22 -0400)
commit528509e1bc41c7fe4e51f7bb550db6343b29e841
tree61fc75fa4357c8ca1b2e4923acfca1fdb79c30eb
parent2860ae6c4927dbbca9316c81ce15cbbb7df49750
Add "render_nulls" flag to bulk_insert as optional performance optimization

Currently, ``Session.bulk_insert_mappings`` omits NULL values which
causes it to break up batches of inserts based on which batches
contain NULL and which do not.

By adding this flag, the same columns are rendered in the INSERT
for all rows allowing them to be batched.  The downside is that
server-side defaults are omitted.

Doctext-author: Mike Bayer <mike_mp@zzzcomputing.com>
Change-Id: Iec5969304d4bdbf57290b200331bde02254aa3a5
Pull-request: https://github.com/zzzeek/sqlalchemy/pull/243
doc/build/changelog/changelog_11.rst
lib/sqlalchemy/orm/persistence.py
lib/sqlalchemy/orm/session.py
test/orm/test_bulk.py