MySQL:在什么情况下我应该选择 MyIsam 而不是 innoDB?
InnoDB 看起来几乎完全优越,但在什么情况下我应该选择 MyIsam?
提前致谢!
InnoDB seems almost entirely superior but in what case should I go for MyIsam?
Thanks in advance!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您不打算进行大量流量/交易,MyIsam 会快得多。
MyIsam 的问题是它在使用时锁定表,而 innodb 只锁定行。因此,Innodb 速度稍慢,但允许同时访问同一个表,因此它更适合大流量/事务。
因此,总而言之,如果您不希望您的网站访问数据库太多且流量较低,那么 myIsam 通常是速度的最佳选择。
MyIsam is much faster if you don't plan on having lots of traffic/transactions.
The problem with MyIsam is that it locks the table when it's in use, whereas innodb just locks the row. 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.
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.