EXPLAIN SELECT A_id, B_id FROM A, B WHERE B_id =
'\\\\path\subpa th\morepath\001-0466.html' AND A_id = 4 AND B_code=A_code;
Things get complicated when more than one tables are involved.
Let's say I have indexes for A_id, A_code on table A, and an index for B_id
on table B. How can I hint MySQL that which indexes it should use? In the
example above, I expect one index on table A and one index on table B are
actually used. When I looked at it with the EXPLAIN command, I found out
that only the index for B_id is used.
'\\\\path\subpa th\morepath\001-0466.html' AND A_id = 4 AND B_code=A_code;
Things get complicated when more than one tables are involved.
Let's say I have indexes for A_id, A_code on table A, and an index for B_id
on table B. How can I hint MySQL that which indexes it should use? In the
example above, I expect one index on table A and one index on table B are
actually used. When I looked at it with the EXPLAIN command, I found out
that only the index for B_id is used.
Comment