The major help is preventing clobbering a value for concurrency.

Prior to this when you loaded an object from SQL into a django model, it would 
fetch all the values
as they were at that time, and store them in the model instance. Then when you 
saved it it would
write all those values back out to the database, even if someone else had 
changed them and
you didn't.

Now if you fetch a particular instance, and make a change, you can save only 
that value, and you
won't clobber other peoples saves if they made a change to an unrelated field 
on that row.


On Friday, November 2, 2012 at 9:42 PM, Christian Jensen wrote:

> I was just writing some code against 1.5 and thought I might use the new 
> .save(update_fields=['xyz']) then I realized I was using PostgreSQL - which 
> is an MVCC... which re-writes the entire row as far as I know even when one 
> column is being updated.
> 
> I popped into the release notes and it does in fact indicate that it is 
> useful for high concurrency scenarios.
> 
> I thought it would be nice to note in the docs somewhere that it is really 
> not useful for database of this type unless you are using a healthy amount of 
> the update_fields elsewhere.
> 
> I might be wrong on all of this.
> 
> I have never made a documentation change nor have any idea what the process 
> would be so if someone chooses to make this note, please do!
> 
> Thanks everyone!
> Christian
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Django developers" group.
> To view this discussion on the web visit 
> https://groups.google.com/d/msg/django-developers/-/LIGJJ2qwBZgJ.
> To post to this group, send email to django-developers@googlegroups.com 
> (mailto:django-developers@googlegroups.com).
> To unsubscribe from this group, send email to 
> django-developers+unsubscr...@googlegroups.com 
> (mailto:django-developers+unsubscr...@googlegroups.com).
> For more options, visit this group at 
> http://groups.google.com/group/django-developers?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com.
To unsubscribe from this group, send email to 
django-developers+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en.

Reply via email to