InnoDB和MYISAM哪个好?
我正在使用mySQL服务器,我开始知道mySQL同时使用InnoDB和MYISAM引擎。所以我想知道对于任何大项目我应该选择InnoDB还是MYISAM引擎。
I am using mySQL server and I came to know that mySQL uses both InnoDB and MYISAM engine.So I want to know for any big project which engine should I choose InnoDB or MYISAM.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
当您有许多外键关系需要管理时,InnoDB 可能更可取,因为它具有 MyISAM 所缺乏的强制外键以及级联删除和更新的能力。
InnoDB的另一个重要特性是事务。如果需要将多个语句作为事务处理,请使用 InnoDB。
InnoDB may be preferable when you have many foreign key relationships to manage, as it has the ability MyISAM lacks to enforce foreign keys and cascade deletes and updates.
The other important feature of InnoDB is transactions. If you have a need to process multiple statements as transactions, use InnoDB.
InnoDB 是更现代的存储引擎,并且被认为更可靠(支持原子事务和外键约束等)。
然而,MyISAM 的性能可能更高,并且支持全文搜索。
如果你不需要FTS,我会推荐InnoDB。
一些额外的阅读: http://blog.inetu.net/2009/ 04/mysql-innodb-or-myisam/
InnoDB is the more modern storage engine, and is considered more reliable (supporting things such as atomic transactions and foreign key constraints).
However, MyISAM may be more performant, and supports full text search.
If you don't need FTS, I would recommend InnoDB.
Some additional reading: http://blog.inetu.net/2009/04/mysql-innodb-or-myisam/
InnoDB 应该是所有新安装的 MySQL 的默认设置。除非有充分的理由,否则不要使用 MyISAM。
这篇文章有InnoDB与MyISAM的比较:
http://www.mysqlperformanceblog .com/2009/01/12/should-you-move-from-myisam-to-innodb/
另请参阅以下 StackOverflow 帖子:
MyISAM 与 InnoDB
InnoDB should be the default for all new MySQL installations. Don't use MyISAM unless you have a very good reason to do so.
This article has a comparison of InnoDB vs. MyISAM:
http://www.mysqlperformanceblog.com/2009/01/12/should-you-move-from-myisam-to-innodb/
Also see the following StackOverflow post:
MyISAM versus InnoDB