2011/12/6 kenneth gonsalves <law...@thenilgiris.com> > > I first did select_related() and the laptop nearly caught fire! timed > out after an hour or so. I then did select_related(depth=1) and it took > less than a minute. >
Indeed, select_related() will follow every foreignkey it gets to, which can be a lot, so you either have to specify a field like I did ('hole'), or a depth. Glad it worked! > there is a lot of duplicated code - a huge clean up is needed, but every > time I sit to do it, a new feature is needed, so it does not get done! > Ah, the usual plague. Nothing is as permanent as a hack that works ;) will do - thanks to all for taking the trouble of reading the code and > making suggestions. It was just some thoughts after a quick scan, not really any trouble. Actually, I should be sorry for the unsolicited advice, I'm glad you took it the right way! ;) Best regards Håkon Erichsen -- 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.