Is it a good practice to set up a database with some InnoDB and some MyISAM tables depending on their use? I would set InnoDB only for those involved in transactions and MyISAM for everything else. Does this have some kind of negative effect or anything to avoid this solution?
MySQL different storage engines for tables
Use InnoDB for all tables, unless you can prove a compelling performance advantage for using MyISAM, or you need MyISAM's FULLTEXT or GIS indexes.
InnoDB is the default storage engine in MySQL 5.5 and later. InnoDB is crash-safe, and it is being developed actively. And it has better performance than MyISAM in most cases.
MyISAM gets corrupted easily during a crash. It does not save data to disk synchronously (relies on filesystem buffering). It has only table-level locking. It is receiving no development or enhancement, and it's on its way to becoming deprecated.
@RolandoMySQLDBA, yeah, but MyISAM is still used for system tables, and it will probably not become truly deprecated until 5.8 (IMHO). –
Giant
Perhaps, MySQL (eh Oracle) could make a Storage Engine called SYSTEM which maintains the MyISAM systems tables. Then, there's those 5 pesky InnoDB system tables, the CSV logs. Ugh !!! –
Commitment
@RolandoMySQLDBA, nice thought, but honestly I think they will try to find a way to make the system tables InnoDB. –
Giant
I suppose that would be wiser because you could just copy the MyISAM tables to another installation and possibly get credentials you shouldn't have elsewhere. On the flipside, if the system tables are InnoDB (which 5 are now) you would have to remember to mysqldump the system tables on some occasions. Either way, Oracle will have something up its sleeve soon enough. –
Commitment
Update... It won't be 5.8; it is 8.0; early releases came out late in 2016. The "Data Dictionary" is now in InnoDB tables, not files and MyISAM tables. –
Aloud
The 8.0 Data Dictionary will be "backed up" by flat files of some kind, just in case the InnoDB tables get too hosed. –
Aloud
Also,
FULLTEXT
and SPATIAL
are now fully implemented in InnoDB. –
Aloud Thanks @RickJames, I wrote the above comments in 2013 as you can tell, so that info is worth updating. –
Giant
© 2022 - 2024 — McMap. All rights reserved.
FTS_DOC_ID
(in all caps) and that fulltext searches give kind of unexpected results. – Giant