#35936: Speeding up Postgres bulk_create by using unnest
-------------------------------------+-------------------------------------
Reporter: Simon Charette | Owner: Simon
Type: | Charette
Cleanup/optimization | Status: closed
Component: Database layer | Version: 5.1
(models, ORM) |
Severity: Normal | Resolution: fixed
Keywords: postgres bulk | Triage Stage: Ready for
create unnest | 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:"ad6bca92a87e72dc7e5572f792463ba33f4da37d" ad6bca92]:
{{{#!CommitTicketReference repository=""
revision="ad6bca92a87e72dc7e5572f792463ba33f4da37d"
[5.2.x] Fixed #36107 -- Adjusted UNNEST bulk_create strategy to opt-out
sized arrays.
The array fields opt-out heuristic failed to account for sized arrays.
Note that we keep relying on db_type as opposed to performing an
ArrayField
instance check against the column's field as there could be other
implementations of model fields that use Postgres arrays to store the
optimization must be disabled for all of them.
Refs #35936.
Thanks Claude Paroz for the report and test.
Backport of 22fc151bb86a553d84c62d7effd289356e9b6c6c from main.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/35936#comment:8>
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/0107019483dc6eeb-b1d95255-c151-4cd2-a487-4cf585cb8111-000000%40eu-central-1.amazonses.com.