On Tue, 2009-01-27 at 02:17 -0800, Andrew Ingram wrote:
> Hi All,
> 
> I'm using something along the following lines to bulk add a bunch of
> objects to a model's reverse foreignkey relationship:
> 
> foo.bar_set.add(*bars)
> 
> where bars is a list of Bar objects.
> 
> I've noticed that Django is generating a new INSERT query for each
> object in the list rather than just using a single INSERT with all the
> objects. I'm no expert on whether this is optimal or not, I just want
> to be sure that this behaviour is deliberate rather than an oversight.

At present, at least, Django never generates multi-value insert
statements.

Regards,
Malcolm



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

Reply via email to