简体   繁体   中英

MySQL: index diffrences between innoDB and MyISAM

innoDB和MyISAM中的索引之间的主要区别是什么?

InnoDB is a fully ACID compliant database with support for transactions, MVCC , replication, and like a modern filesystem keeps a journal of changes so that in case of a sudden crash or hardware malfunction it can recover to the last known-good state of the database.

MyISAM is the original database engine for MySQL with a focus on speed over reliability. It lacks transaction support and doesn't use a journal so if the database crashes it can be easily corrupted. It's a lot like the Linux ext2 filesystem in this regard. This is a product of the era where a high-end computer might have all of 256MB of memory and a 9GB hard disk was considered large.

While on antiquated hardware MyISAM was a necessity, on modern hardware InnoDB actually performs better. It's been continuously improved since its introduction and has been aggressively optimized. Each point release of MySQL continues to push performance on InnoDB while MyISAM remains largely untouched, left in there purely for legacy concerns.

So unless you have a very good reason you should be using InnoDB for all new applications.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM