什么时候表从MyISAM改变到InnoDb? [英] When it is time for a table to change from MyISAM to InnoDb?

查看:136
本文介绍了什么时候表从MyISAM改变到InnoDb?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这个问题类似于我上一个问题的延续:

This question is like a continuation of my previous question: Am I right that InnoDb is better for frequent concurrent updates and inserts than MyISAM?

但这一次我有具体的问题。

我们知道,当我们没有很多并发更新(插入)时,MyISAM比InnoDb更快。当我们有许多并发更新时,MyISAM表被锁定,所有其他客户端都应该等待。

But this time I have concrete questions.
We know that MyISAM is faster than InnoDb when we don't have many concurrent updates (inserts). When we have many concurrent updates MyISAM table gets locked and all other clients should wait.

1)但是是时候从MyISAM更改为InnoDb?每秒更新一次?每秒更新10次?每秒更新一次?

2)对于一个具体的例子,将更好的改变为我的网站上的表,我通常有一些更新每分钟(来自不同的会话),InnoDb,但有时每秒可以〜2-3次更新?

1) But when it is time to change from MyISAM to InnoDb? 1 update every second? 10 updates every second? 100 updates every seconds?
2) For a concrete example, will it be better to change to InnoDb one of the tables on my website where I usually have a few updates per minute (from different sessions), but sometimes it can be ~2-3 updates per second?

推荐答案

我认为你的问题在上一个问题引用。

I think your questions were pretty much answered in the previous question you referred to.

1)创建表时。 InnoDB提供比仅仅行级锁定更多的优势。更好的速度,当你有多个sql客户端做更新,减少数据丢失/损坏,参考完整性等风险...只有几个事务每秒(TPS),你不太可能告诉性能的差异,但InnoDB更可靠和规模更好。

1) When you create the table. InnoDB provides more advantages than merely row-level locking. Better speed when you have multiple sql clients doing updates, less risk of data loss/corruption, referential integrity etc... With only a few transactions per second (TPS) you're not likely to tell the difference in the performance, but InnoDB is more reliable and scales better.

2)只有2-3 TPS,你不会看到InnoDB和MyISAM之间的任何显着差异。即使在半古老的硬件上。

2) With only 2-3 TPS you will not see any significant difference between InnoDB and MyISAM. Even on semi-ancient hardware.

FYI,现代磁盘驱动器应该能够每秒处理至少〜200次更新事务。

FYI, a modern disk drive should be able to handle at least ~200 update transactions per second.

我建议您阅读 InnoDB MVCC ACID

这篇关于什么时候表从MyISAM改变到InnoDb?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆