--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django...@googlegroups.com.
To unsubscribe from this group, send email to django-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Hi,
I have an operation that takes about 10 minutes to befinished. It takes that long because our DB is pretty big.
This produces a timeout.
I have tried so set the timeout in apache higher but it seems that apache is not taking this directive....just keeps timing out after 300 seconds.
Is there anything I can to to overcome this within my app ?
Thanks, that does sound like a better idea and now that i think about it i saw this behaviour on many other webinterfaces already…don’t know why i didn’t think about that J
However I’ve noticed that it’s not the query that is taking so long, it’s the processing of the result that takes ~180 seconds…yes 10 minutes might have been a little exaggerated ;-)
It’s this code:
for buchung in buchungen:
if str(buchung.Produkt.Bestell_Nr):
buch_pool[str(buchung.Produkt) + " #" + str(buchung.Produkt.Bestell_Nr)].append([str(buchung.Aktivitaet), str(buchung.Minuten)])
else:
buch_pool[str(buchung.Produkt)].append([str(buchung.Aktivitaet), str(buchung.Minuten)])
You mightbe wondering why I’m even building such a weird construct. Truth is, this thing has grown over time with different devs working on it and I don’t have time to change it.
My guess is that this code is triggering a load of queries…any idea how to make this more efficient ?
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to
django...@googlegroups.com.
To unsubscribe from this group, send email to
django-users...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en.
. . . . . . . . . . . . . . . . . . . . . . . . . .
Ing. Patrick Szabo
Developer
LexisNexisA-1030 Wien, Marxergasse 25
Nevermind…select_related() did the trick.
226 queries cut to 4…amazing this little statement J
. . . . . . . . . . . . . . . . . . . . . . . . . .
Ing. Patrick Szabo
Developer
LexisNexisA-1030 Wien, Marxergasse 25
Tel.: +43 1 53452 1573
Fax.: +43 1 534 52 146
. . . . . . . . . . . . . . . . . . . . . . . . . .