Search code examples
mysqlinnodbmyisam

Why MySQL mysql table is still is MYISAM when InnoDB is encourage to use?


I like to know why still even with version mysql server 5.6+

MySQL store their meta database('mysql') tables mostly in MyISAM type when they themselves encourage developers/users to use the InnoDB as the default Database engine and considered outdated to use MyISAM anymore ?


Solution

  • Of course no one can speak for the dev team, but MyISAM seems to be the most appropriate choice for these tables :

    • no real need for row-level locking: there is little if any need for concurrency, since very few threads (typically one: the administrator) is supposed to ever write to this database at a time. Table-level locking should suffice.
    • very rare need for transactions: typical access is read-only
    • little need for support of foreign keys: the structure is trivial, MySQL devs don't need a safeguard to maintain referential integrity (not even you, smart administrator, are not supposed to fiddle with this database: administrative tools and commands exist for a reason)
    • speed does matter here: MyISAM is still slightly faster than InnoDB, especially for reads
    • if it ain't broke, don't fix it

    I could see one reason to switch to InnoDB though: its resistance to crashes and its ability to recover from one, due to its transactional nature.