List:General Discussion« Previous MessageNext Message »
From:Kayra Otaner Date:December 1 2005 5:36pm
Subject:Index merge optimization with joined tables?
View as plain text  
Hello,

Is MySQL 5.0's Index merge optimization is also available to multiple
table joins? When I do explain on 3 table joins, only one key per table
is used :

SELECT R.*  FROM L, M, R
WHERE
L.key1  = 1
AND    L.key2 = M.key2
AND    M.key1 = R.key1

R table has 10 rows
M table has 24 million rows
L table has 9 million rows

Explain plan only shows ref & eq_ref type optimization is being used. M
table has 2 key fields used in the joins and only one is used. Tables
are InnoDB, total size of the tables is around 9G. I'm using MySQL max
5.0.16

Any suggestions?

Thank you

Kayra Otaner


Thread
Index merge optimization with joined tables?Kayra Otaner1 Dec
  • Re: Index merge optimization with joined tables?Dan Nelson1 Dec