Search code examples
mysqlindexinginnodbmyisam

What MYSQL table storage engine do most websites use? One that supports FULLTEXT indexing as well as RELATIONSHIPS?


This is what I learnt in one of the posts I read in Stackoverflow.

"First major difference i see is that InnoDB implements row-level lock while MyISAM can do only a table-level lock. You will find better crash recovery in InnoDB. However, it doesn't have FULLTEXT search indexes, as does MyISAM. InnoDB also implements transactions, foreign keys and relationship constraints while MyISAM does not."

Since most sites need relationship between tables as well as a site search, which engine do they use? Which one should I?


Solution

  • I work for Percona, a leading MySQL consulting and training company. We recommend InnoDB as the default choice of storage engine, whereas MyISAM is recommended only in exceptional scenarios when one can prove that it has some advantage (i.e. prove it through benchmarking your app with both storage engines).

    InnoDB has become the default storage engine as of MySQL 5.5, in December 2010.

    In MySQL 5.6, which was released in February 2013, InnoDB now supports its own implementation of fulltext indexing. But most sites that need fulltext search at large scale find that using Sphinx Search is still superior. See also my presentation Full Text Search Throwdown.

    InnoDB not only has the advantages you list, but it is also faster than MyISAM in many benchmarks. There was once a time, many years ago, when people thought of MyISAM as the faster storage engine. But InnoDB has received a lot of work to improve its performance and scalability.

    InnoDB requires more attention to tuning configuration variables, since the defaults are not exactly suitable for use by a production website. I have another presentation, Guide to InnoDB Status, which describes some of the most important tuning options.