#35936: Speeding up Postgres bulk_create by using unnest
-------------------------------------+-------------------------------------
     Reporter:  Simon Charette       |                    Owner:  Simon
         Type:                       |  Charette
  Cleanup/optimization               |                   Status:  assigned
    Component:  Database layer       |                  Version:  5.1
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:
     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:"2638b75554d2624dca3062a8da113a47f855f2a2" 2638b755]:
 {{{#!CommitTicketReference repository=""
 revision="2638b75554d2624dca3062a8da113a47f855f2a2"
 Refs #35936 -- Avoided field placeholder lookup for each value inserted.

 By building the list of placeholders for each inserted fields once it
 doesn't have to be looked up for each inserted rows twice.

 The query_values_10000.benchmark.QueryValues10000.time_query_values_10000
 ASV
 benchmark showed a 5% speed up for 10k items on SQLite for a single field
 insertion. Larger performance gains are expected when more fields are
 involved.
 }}}
-- 
Ticket URL: <https://code.djangoproject.com/ticket/35936#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/01070193b5cabdf4-1405d98d-726b-4e7e-b1e5-00fa6cb3a66b-000000%40eu-central-1.amazonses.com.

Reply via email to