#36490: Avoid unnecessary transaction in QuerySet.bulk_create
-------------------------------------+-------------------------------------
Reporter: Simon Charette | Owner: Simon
Type: | Charette
Cleanup/optimization | Status: closed
Component: Database layer | Version: 5.2
(models, ORM) |
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Sarah Boyce <42296566+sarahboyce@…>):
In [changeset:"5eca562ac3cbfd3b0c6522f3d7ad4be034e1cb8c" 5eca562a]:
{{{#!CommitTicketReference repository=""
revision="5eca562ac3cbfd3b0c6522f3d7ad4be034e1cb8c"
Refs #36490 -- Simplified QuerySet._batched_insert returning fields
handling.
Whether or not returning_fields should be specified to _insert is not a
function of each batches so the conditional can be moved outside of the
loop.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/36490#comment:5>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/django-updates/01070198ace77336-abba0a5c-37b8-480e-b1e6-23097cd051cc-000000%40eu-central-1.amazonses.com.