Ok, for example, I can pass in Modelname.objects.select_related().all() for the queryset, obj's_Id for the object_id. And the 'object' in the generic view will actually be calling a .get(id=obj's_Id) on that lazy, select_related queryset? thanks for the reply, Johnny
On Oct 5, 3:18 am, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Sun, 2008-10-05 at 03:32 -0700, johnny wrote: > > Hi, > > I'm wondering if select_related() is used for the object_detail > > generic view. If not, shouldn't it be since it's more efficient? > > Also, is select_related only useful on a .get() method? > > It's entirely up to you, when creating your queryset, whether to use > select_related() or not. It is certainly not something anything like a > generic view should always put in place, since it can impact performance > in a negative way if you aren't using all the related fields it > retrieves (which can be a lot if your model has lots of linkages to > other models or itself). > > select_related() can be used on any queryset, not just when using a > get() call. > > Regards, > Malcolm --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---