]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
use QueuePool for sqlite file databases
authorMike Bayer <mike_mp@zzzcomputing.com>
Wed, 22 Dec 2021 13:34:15 +0000 (08:34 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Thu, 10 Feb 2022 16:09:22 +0000 (11:09 -0500)
commit22ed657827b487df9012def07271aed01bd4ae12
treef1c0693953df077c00840321d3dbf563351d2698
parent449389a45f358300ba95f7d03c7b94b64703e31a
use QueuePool for sqlite file databases

The SQLite dialect now defaults to :class:`_pool.QueuePool` when a file
based database is used. This is set along with setting the
``check_same_thread`` parameter to ``False``. It has been observed that the
previous approach of defaulting to :class:`_pool.NullPool`, which does not
hold onto database connections after they are released, did in fact have a
measurable negative performance impact. As always, the pool class is always
customizable via the :paramref:`_sa.create_engine.poolclass` parameter.

Fixes: #7490
Change-Id: I5f6c259def0ef43d401c6163dc99f651e519148d
doc/build/changelog/migration_20.rst
doc/build/changelog/unreleased_20/7490.rst [new file with mode: 0644]
doc/build/core/pooling.rst
lib/sqlalchemy/dialects/sqlite/pysqlite.py
test/dialect/test_sqlite.py