title: Django batching/bulk update_or_create?
body: <p>I have data in the database which needs updating peridocially. The source of the data returns everything that's avalible at that point in time, so will include new data that is not already in the database.</p>
  
  <p>As I loop through the source data I don't want to be making 1000s of individual writes if possible.</p>
  
  <p>Is there anything such as <code>update_or_create</code> but works in batches?</p>
  
  <p>One thought was using <code>update_or_create</code> in combination with manual transactions, but I'm not sure if that just queues up the individual writes or if it would combine it all into one SQL insert? </p>
  
  <p>Or similarly could using <code>@commit_on_success()</code> on a function with <code>update_or_create</code> inside a the loop work?</p>
  
  <p>I am not doing anything with the data other than translating it and saving it to a model. Nothing is dependant on that model existing during the loop</p>