#31749: Unable to find effective method to bulk_update else create
-------------------------------------+-------------------------------------
               Reporter:             |          Owner:  nobody
  XtremeGood                         |
                   Type:  New        |         Status:  new
  feature                            |
              Component:  Database   |        Version:  3.0
  layer (models, ORM)                |       Keywords:  bulk_update,
               Severity:  Normal     |  bulk_create
           Triage Stage:             |      Has patch:  0
  Unreviewed                         |
    Needs documentation:  0          |    Needs tests:  0
Patch needs improvement:  0          |  Easy pickings:  0
                  UI/UX:  0          |
-------------------------------------+-------------------------------------
 I 'm making this code where on daily basis after preprocessing a csv file
 100, 000 -200, 000 or even more rows will be read. Each row will get
 converted to a model object. Now the csv says me nothing about whether
 those ids existed in the database or not. I have been said
 "update if key already present else create a new one". And the client has
 superficial demands that it should be done in seconds. I said that it's
 not possible and somehow he is ready to wait for 15 minutes at the max.
 That's why I 'm refraining from using create_or_update or other functions.
 Is there any way to achieve the speed and accomplish the task at the same
 time? There are around 100 columns and the file is being read in small
 chunks because I can't read it whole in the memory. It's whopping 140 mbs.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/31749>
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/053.3a1c1ae17c4e779c382a4a7d971266a2%40djangoproject.com.

Reply via email to