简体   繁体   English

从innodb转换为MyISAM以获取全文

[英]Convert from innodb to MyISAM for fulltext

I want to use fulltext in a big table, and I can't update mysql for support fulltext in innodb or use external search engine. 我想在一个大表中使用fulltext ,并且我无法更新mysql以在innodb支持fulltext或使用外部搜索引擎。

So I think I have 2 option here. 所以我想我这里有2个选择。

1.Using innodb and search database with LIKE 1,使用innodbLIKE搜索数据库

2.Convert my table to MyISAM 2.将我的表转换为MyISAM

I don't know what is the best way and need help for this. 我不知道什么是最好的方法,为此需要帮助。

Option 3 is better: Upgrade to MySQL 5.6 where FULLTEXT indexes are supported on InnoDB . 选项3更好:升级到MySQL 5.6,其中InnoDB支持FULLTEXT索引

If you can't do this you're really asking for trouble. 如果您做不到,那就是在自找麻烦。

Using #1 is futile, it won't scale beyond even the most trivial sized databases. 使用#1是徒劳的,即使是最琐碎的数据库也无法扩展。

Going with #2 is a bad call, MyISAM is a notoriously troublesome database engine that doesn't support transactions or journaling. 与#2一起使用是一个不好的电话,MyISAM是一个众所周知的麻烦数据库引擎,不支持事务或日记。 Data integrity is always approximate and a server crash can scramble your database into an unusable state since there's no transaction journal for recovery and streaming replication isn't an option. 数据完整性始终是近似的,并且服务器崩溃可能会使您的数据库陷入无法使用的状态,因为没有用于恢复的事务日志,并且无法进行流复制。

The alternative is to use an add-on searching tool like Sphinx . 替代方法是使用诸如Sphinx的附加搜索工具。 If this is a no-go you're really going to have to re-evaluate your constraints. 如果这是不行的事,那么您实际上将不得不重新评估您的约束。

Honestly, upgrading to MySQL 5.6 is as seamless as it gets. 老实说,升级到MySQL 5.6是无缝的。 Most in-place upgrades work flawlessly. 大多数就地升级都可以正常工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM