On Fri, 2009-02-20 at 16:08 +0100, Alessandro Ronchi 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. > > Is there any way to make persistant connections?
Russell's already addressed most of your questions. I'll just add that a single request/response cycle uses only a single database connection. Multiple database statements can well be sent down that connection, but we open only a single connection (and then close it once the response has been sent). If you want connection pooling between requests because the database is over a slow network or has costly connection, then the solution is to use pooling support external to Django (e.g. pgpool for PostgreSQL). However, that's unlikely to be the real issue here. 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 -~----------~----~----~----~------~----~------~--~---