-
Notifications
You must be signed in to change notification settings - Fork 2
MySQL Engine Types
I'm working on a project that uses MySQL, and I noticed that I've got a few tables using
MyISAMand a few tables usingInnoDB.Which MySQL table engine should I use?
First off, I'm sorry.
Second, you should always use InnoDB. MyISAM is not a good table engine, mainly because it lacks transaction support.
You may notice this cropping up particularly in tests, where they just seem to fail for no reason in bulk but pass on their own. This is likely due to transactions working properly on some tables but not others.
You can find tables that are using MyISAM with the following query:
SELECT
table_name,
engine
FROM information_schema.tables
WHERE table_schema = '*DATABASE*' and
engine = 'MyISAM';You can upgrade those tables to use InnoDB with the following query:
alter table *TABLE* engine = 'InnoDB';🏳️🌈🦄 Sharing is caring. 🦄🏳️🌈
TODO: can we recreate the tag system here roughly with sections about certain subjects?