Alright, anyways, if someone wants to test this, it worked 100% for me, the updated select_related(). I'm not sure if we're updated with the latest nightly but ill try to get that done today.
http://dpaste.com/4536/ This replaces django/db/query.py and adds two arguments for select_related(): depth=N, the recursion depth, by default, infinite, follows any key where blank isn't True fields=[], a list of fields, right now only supports fields from the base table. I'd like to extend this to be able to do relatedfield__fieldname, as well. if fields is not empty it will change depth to 1 On Jan 10, 5:27 am, Cliff Wells <[EMAIL PROTECTED]> wrote: > David Cramer wrote: > > While working on my select_related changes, I noticed that the db > > backend was doing COUNT(*) for .count().. why? > > > I've changed it on my local copy to count the id column, but unless > > anyone can give me a specific reason, as far as I recall, it's faster > > to just count on the id column.I would expect any non-broken database > > server to optimize this to count > using the primary key, so I doubt that change will make any difference. > > Regards, > Cliff --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---