Nice find!

If you turn debugging on for "django.db.backends", it will show you what 
SQL queries are being issued, and the time taken for each.

LOGGING['handlers']['console'] = { 'level':'DEBUG', 'class': 
'logging.StreamHandler' }
LOGGING['loggers']['django.db.backends'] = { 'handlers':['console'], 
'level':'DEBUG' }

(you could also just modify the existing LOGGING variable)

On Monday, December 17, 2012 11:42:07 PM UTC-8, Szabo, Patrick (LNG-VIE) 
wrote:
>
>   Nevermind…select_related() did the trick. 
>
> 226 queries cut to 4…amazing this little statement J
>
>
>       

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/9t-bjnbj08MJ.
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