Hello all,

I'm trying to do some profiling on an application so I know where to  
optimize and how I can expect it to perform with large datasets. I use  
the debug toolbar to inspect sql queries.

 From time to time certain pages will generate ~100 duplicated extra  
queries. These pages lists orders and every order has two foreign keys  
to Country. I use select_related to select the countries.

All duplicated queries retrieve the same country. I have sifted  
through the codebase and cannot find any rogue loop or such.

Is there a way to trace an sql statement back to the offending python  
statement?


Regards
Knut
-- 
Knut Nesheim  | MTAB Transport & Spedition AB
Box 20164 | SE-161 02 Bromma | Visiting address: Ranhammarsvägen 26
Phone: +46 8 54 600 153
E-mail: knut.nesh...@mtab.se  | Web: www.mtab.se

Vi utför alla uppdrag på grundval av NSAB 2000.
All transactions are carried out according to our standard conditions  
covered by NSAB2000


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