简体   繁体   English

从MyIsam读取的InnoDB上写

[英]Write on InnoDB read from MyIsam

I'm working on a project that requires lots of database inserts. 我正在一个需要大量数据库插入的项目中。 I also need to be able to use something like full-text-search to retrieve the data. 我还需要能够使用诸如全文搜索之类的东西来检索数据。

Is is possible to use 2 tables, with the same exact data, oen MyIsam and one InnoDb to achieve this effect? 是否可以使用2个具有相同精确数据的表,一个MyIsam和一个InnoDb来达到这种效果?

Write on the InnoDb, and somehow read off of the MyIsam? 在InnoDb上书写,然后以某种方式读取MyIsam?

Yes, use replication. 是的,使用复制。 On the "master" server use InnoDB. 在“主”服务器上,使用InnoDB。 On the slave, change the table type to MyISAM and add the full text index. 在从属服务器上,将表类型更改为MyISAM并添加全文本索引。 You won't have to do anything in code except insert and select from the proper servers. 除了插入并从适当的服务器中选择之外,您无需执行任何代码操作。

Yes, write to both tables when writing and read from the MyISAM table when searching. 是的,写入时要写入两个表,搜索时要从MyISAM表读取。

There's no way to automatically write to both tables I think, it has to be done in your application code. 我认为无法自动写入两个表,必须在您的应用程序代码中完成。

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

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