G
Guest
Select *
from table1 as a inner join table2 as b where a.field3 = b.field3 and
a.field2 = b.field2 where a.field1 = 803;
Table1 already has a compound index as field1, field2, field3 (in that
order). What can I do to optimize the above query. Would it help to add a
compound index on table2.field2, table2.field3? There is no table2.field1.
Also, would the order of the join conditions matter? Should field2 be
compared before field3?
from table1 as a inner join table2 as b where a.field3 = b.field3 and
a.field2 = b.field2 where a.field1 = 803;
Table1 already has a compound index as field1, field2, field3 (in that
order). What can I do to optimize the above query. Would it help to add a
compound index on table2.field2, table2.field3? There is no table2.field1.
Also, would the order of the join conditions matter? Should field2 be
compared before field3?