On Sat, Feb 21, 2009 at 12:08 AM, Alessandro Ronchi
<alessandro.ron...@soasi.com> wrote:
>
> is it possible to group different model save() to avoid the
> multiplication of db connections and queries?
>
> I need to make a lot of save() of different new models and it should
> be very useful to find a way to group them and commit together.

Depends what you mean by "group them". If you mean "in a single
transaction", then sure - Django has transaction support, and it's
well documented. However, if you mean "in a single INSERT statement,
then no, there isn't anything natively to help with this. If database
writes are a point worth optimizing in your application, writing raw
SQL is the solution.

Yours,
Russ Magee %-)

--~--~---------~--~----~------------~-------~--~----~
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