On Oct 15, 4:43 pm, refreegrata <[email protected]> wrote: > ok, thank for reply. > > I think that with this query: > > " AA.object.filter(...).select_related( field related in BB ) " > > The impact in the performance is minimun > > But with this query > > " AA.object.filter(...).select_related() " > > the impact is higher, because the first query do an unique "join", but > the second "join" can do multiple "join"s and I just need the AA > fields and the BB fields. > > Is this idea correct?
Well, it depends how many relationships the AA model has. In general, you're probably right, but this is really micro-optimisation. -- DR. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to [email protected]. 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.

