tektipdjango
IS-IT--Management
- Jan 28, 2004
- 188
suppose you have 2 tables A and B with a join on A.Id and B.A_Id.
A.Id is indexed and not B.A_Id
what is is most efficient?
1 -
select A.Id
from
A
left join
B
on A.Id=B.A_Id
2 -
select A.Id
from
B
right join
A
on B.A_Id=A.Id
I Think solution 2 is best, is it right?
django
bug exterminator
tips'n tricks addict
A.Id is indexed and not B.A_Id
what is is most efficient?
1 -
select A.Id
from
A
left join
B
on A.Id=B.A_Id
2 -
select A.Id
from
B
right join
A
on B.A_Id=A.Id
I Think solution 2 is best, is it right?
django
bug exterminator
tips'n tricks addict