0

this may be a very trivial question but i dont understand it, because afaik MyISAM should be faster

i have a database containing all MyISAM tables except one - it's simple N:M joining table with ~130k records. i dont know why only this table is InnoDB, but it wasnt intentional :) It has indexes on both foreign keys pointing to its associated tables.

I tried to change the table to MyISAM, cause i tought it would boost the performance, but instead, queries involved this table was like 50x slower (i even tried to recreate the indexes, but it didnt help). Why is that?

  • 1
    A well designed innodb table (clustered indexes) will out perform myisam hands down - http://stackoverflow.com/questions/4419499/mysql-nosql-help-me-to-choose-the-right-one-on-a/4421601#4421601 – Jon Black Jan 23 '12 at 00:10
  • Why would you think that MyISAM is faster than InnoDB? – Aaron Brown Jan 23 '12 at 02:39

1 Answers1

2

I suspect your replacement indexes aren't getting used. Have you tried analysing the query plan with EXPLAIN? This should show you whether your indexes are being used, and how.

Just enter "EXPLAIN [yourquery];" into the MySQL console.

Jonathan Williamson
  • 1,189
  • 2
  • 10
  • 17