Re: fields in inner join

2010-10-17 Thread Daniel Roseman
On Oct 15, 4:43 pm, refreegrata 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

Re: fields in inner join

2010-10-15 Thread refreegrata
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

Re: fields in inner join

2010-10-15 Thread Daniel Roseman
On Oct 15, 4:19 pm, refreegrata wrote: > Hello, how can i get fields from different tables related for a > foreign key? > > When I do a inner join like > > AA.objects.filter(bb__field = ...) ... > > I just can access to the AA fields, and not to fields in the other > table > > in a normal query i

fields in inner join

2010-10-15 Thread refreegrata
Hello, how can i get fields from different tables related for a foreign key? When I do a inner join like AA.objects.filter(bb__field = ...) ... I just can access to the AA fields, and not to fields in the other table in a normal query i can do something like "select AA.*, BB.* FROM. AA inner jo