将表转换为 InnoDB 时应该注意哪些复杂情况?
我在安装 liferay 时遇到了麻烦,它突然(没有任何代码修改)因“重复的 id”错误而失败。我们发现可以通过将 mysql 引擎更改为 InnoDB 来解决该问题。
我现在正在计划改变,但我不确定这个过程中可能会出现什么并发症。
我已经检查了这个问题中提到的全文索引
Converting table from MyISAM to INNODB
还有其他可能的问题吗?
I'm having trouble with a liferay installation that is suddenly (without any code modifications) failing with "dulplicate id" errors. We've identified that the issue may be solved by changing the mysql engine to InnoDB.
I'm planning the change now, but i'm not sure what complications are likely in the process.
I've checked for full text indexes mentioned in this question
Converting table from MyISAM to INNODB
Are there any other likely problems I should
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
最大的问题是转换前没有数据库备份。有了备份,您就可以尝试所有您喜欢的事情。当然,您是在测试数据库上执行此操作,对吗? (不是生产数据库。)
Biggest problem is not having a backup of the database before conversion. With a backup, you can experiment all you like. Naturally you're doing this on a test database, right? (Not a production database.)
Andrew,MyISAM 和 InnoDB 之间有很多区别,最重要的是它们由 MySQL conf 中的不同配置选项控制。还有一个事实是,与 MyISAM 不同,InnoDB 是 ACID 兼容的。此外,备份不能再仅通过复制 MYI 和 MYD 文件来完成。然后是两个引擎之间不同的大小要求、不同的索引类型和不同的性能特征的问题。
尽管我在大多数情况下喜欢 InnoDB,请问是什么让您相信切换到 InnoDB 可以解决您的问题?也许您应该寻找该问题的替代答案而不是这个问题?
Andrew, there are lots of differences between MyISAM and InnoDB, the least of which is the fact that they are controlled by different configuration options in the MySQL conf. There is also the fact that InnoDB is ACID compliant unlike MyISAM. Also, backups cant be done with just copying MYI and MYD files anymore. Then there is the matter of different size requirements, different index types, and different performance characteristics between the two engines.
Even though I like InnoDB is most cases, may I ask what leads you to believe that a switch to InnoDB will solve your problem? and perhaps you should be seeking an alternate answer to THAT question instead of this one?