mirror of
https://github.com/django/django.git
synced 2025-11-07 07:15:35 +00:00
Fixed #17788 -- Added batch_size argument to qs.bulk_create()
The qs.bulk_create() method did not work with large batches together with SQLite3. This commit adds a way to split the bulk into smaller batches. The default batch size is unlimited except for SQLite3 where the batch size is limited to 999 SQL parameters per batch. Thanks to everybody who participated in the discussions at Trac.
This commit is contained in:
@@ -106,6 +106,11 @@ Django 1.5 also includes several smaller improvements worth noting:
|
||||
* The :ref:`receiver <connecting-receiver-functions>` decorator is now able to
|
||||
connect to more than one signal by supplying a list of signals.
|
||||
|
||||
* :meth:`QuerySet.bulk_create()
|
||||
<django.db.models.query.QuerySet.bulk_create>` has now a batch_size
|
||||
argument. By default the batch_size is unlimited except for SQLite where
|
||||
single batch is limited so that 999 parameters per query isn't exceeded.
|
||||
|
||||
Backwards incompatible changes in 1.5
|
||||
=====================================
|
||||
|
||||
|
||||
Reference in New Issue
Block a user