简体   繁体   English

MySQL:在哪种情况下我应该选择MyIsam而不是innoDB?

[英]MySQL: In which case should I choose MyIsam over innoDB?

InnoDB seems almost entirely superior but in what case should I go for MyIsam? InnoDB似乎几乎完全优越,但是在什么情况下我应该选择MyIsam?

Thanks in advance! 提前致谢!

MyIsam is much faster if you don't plan on having lots of traffic/transactions. 如果您不打算进行大量流量/交易,则MyIsam会更快。

The problem with MyIsam is that it locks the table when it's in use, whereas innodb just locks the row. MyIsam的问题在于,它在使用表时会锁定表,而innodb只会锁定表。 Innodb is a bit slower because of this, but allows simultaneous access to the same table, so it's more suitable for heavy traffic/transactions. 因此,Innodb速度较慢,但​​是它允许同时访问同一张表,因此它更适合于繁忙的流量/事务。

So, to conclude - if you don't expect your site to be accessing your database that much and it's low traffic, then myIsam is usually the best option for speed. 因此,总而言之-如果您不希望您的站点访问数据库这么多且访问量很低,那么myIsam通常是提高速度的最佳选择。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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