#31202: Bulk update suffers from poor performance with large numbers of models 
and
columns
-------------------------------------+-------------------------------------
     Reporter:  Tom Forbes           |                    Owner:  Tom
         Type:                       |  Forbes
  Cleanup/optimization               |                   Status:  assigned
    Component:  Database layer       |                  Version:  dev
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:  Accepted
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by Chris Jerdonek):

 Here's another approach I thought would be worth mentioning. PostgreSQL
 [https://www.postgresql.org/docs/13/sql-copy.html supports] `COPY FROM`
 for copying data from a file (or stream) to a table. For `bulk_update()`
 then, you could use `COPY FROM` to copy the data to a temp table, and then
 do the update from that. I wonder if that would be faster than even
 `django-bulk-update`'s approach, in part because little SQL would be
 needed.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/31202#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 on the web visit 
https://groups.google.com/d/msgid/django-updates/061.aa5c46f1c2dbc5d6854feab1da5e68ed%40djangoproject.com.

Reply via email to