问题描述
当我测试一些mysql提交和回滚过程时,我在MyISAM Engine中发现了一些有关提交和回滚的问题.提交或回滚不能在MyISAM Engine上运行吗?我是否可以知道InnoDB和MyISAM Engine之间的区别.
When I testing some mysql commit and rollback procedure, I found some problems about commit and rollback at MyISAM Engine. Can commit or rollback not working on MyISAM Engine? May I know different between InnoDB and MyISAM Engine.
推荐答案
MyIASM不支持回滚和提交,您需要为此使用InnoDB.
MyIASM does not support the rollback and commit, you need to use the InnoDB for that.
Innodb与MyISAM之间的区别:
我看到的第一个主要区别是InnoDB实现行级锁,而MyISAM只能执行表级锁.您会在InnoDB中发现更好的崩溃恢复.但是,它不像MyISAM一样具有FULLTEXT搜索索引.InnoDB还实现事务,外键和关系约束,而MyISAM不实现.
First major difference I see is that InnoDB implements row-level lock while MyISAM can do only a table-level lock. You will find better crash recovery in InnoDB. However, it doesn't have FULLTEXT search indexes, as does MyISAM. InnoDB also implements transactions, foreign keys and relationship constraints while MyISAM does not.
该列表可以走得更远.但是,它们在彼此的有利与不利方面都有其独特的优势.在某些情况下,它们每个都比另一个更适合.
The list can go a bit further. Yet, they both have their unique advantages in their favor and disadvantages against each other. Each of them is more suitable in some scenarios than the other.
所以总结一下:
- InnoDB具有行级锁定,MyISAM只能执行完整的表级锁定.
- InnoDB具有更好的崩溃恢复.
- MyISAM具有FULLTEXT搜索索引,而InnoDB没有.
- InnoDB实现事务,外键和关系约束,而MyISAM不实现.
这篇关于提交和回滚在Mysql的MyISAM中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!