Please answer these questions before submitting your issue. Thanks!
- What version of Python are you using?
Python 3.10.11 (main, Apr 5 2023, 14:15:10) [GCC 9.4.0]
- What operating system and processor architecture are you using?
Linux-5.14.0-1029-oem-x86_64-with-glibc2.31
- What are the component versions in the environment (
pip freeze)?
alembic==1.10.4
pulumi==3.38.0
pulumi-snowflake==0.28.0
pymssql==2.2.7
PyMySQL==0.9.3
PyYAML==5.3.1
snowflake-connector-python==2.8.3
snowflake-sqlalchemy==1.4.7
SQLAlchemy==1.4.31
- What did you do?
Using the SqlAlchemy 1.4 bulk_save_objects API, I added 5000 objects in one SqlAlchemy session and then committed the session.
- What did you expect to see?
I expected to see one INSERT with 5000 VALUES rows. Instead, I see a variety of INSERT sizes, from 1 row to ~50 rows, and the insert of 5k objects takes 3+ minutes.

Please answer these questions before submitting your issue. Thanks!
Python 3.10.11 (main, Apr 5 2023, 14:15:10) [GCC 9.4.0]Linux-5.14.0-1029-oem-x86_64-with-glibc2.31pip freeze)?Using the SqlAlchemy 1.4 bulk_save_objects API, I added 5000 objects in one SqlAlchemy session and then committed the session.
I expected to see one INSERT with 5000 VALUES rows. Instead, I see a variety of INSERT sizes, from 1 row to ~50 rows, and the insert of 5k objects takes 3+ minutes.