<tfoot id='IAa3D'></tfoot>
  • <small id='IAa3D'></small><noframes id='IAa3D'>

  • <i id='IAa3D'><tr id='IAa3D'><dt id='IAa3D'><q id='IAa3D'><span id='IAa3D'><b id='IAa3D'><form id='IAa3D'><ins id='IAa3D'></ins><ul id='IAa3D'></ul><sub id='IAa3D'></sub></form><legend id='IAa3D'></legend><bdo id='IAa3D'><pre id='IAa3D'><center id='IAa3D'></center></pre></bdo></b><th id='IAa3D'></th></span></q></dt></tr></i><div id='IAa3D'><tfoot id='IAa3D'></tfoot><dl id='IAa3D'><fieldset id='IAa3D'></fieldset></dl></div>
      <legend id='IAa3D'><style id='IAa3D'><dir id='IAa3D'><q id='IAa3D'></q></dir></style></legend>
      • <bdo id='IAa3D'></bdo><ul id='IAa3D'></ul>

        innoDB 表的 MySQL 全文搜索解决方法

        MySQL Full-text Search Workaround for innoDB tables(innoDB 表的 MySQL 全文搜索解决方法)
          <tbody id='HEVg6'></tbody>
        • <bdo id='HEVg6'></bdo><ul id='HEVg6'></ul>
          <legend id='HEVg6'><style id='HEVg6'><dir id='HEVg6'><q id='HEVg6'></q></dir></style></legend>

        • <tfoot id='HEVg6'></tfoot>

          <small id='HEVg6'></small><noframes id='HEVg6'>

                <i id='HEVg6'><tr id='HEVg6'><dt id='HEVg6'><q id='HEVg6'><span id='HEVg6'><b id='HEVg6'><form id='HEVg6'><ins id='HEVg6'></ins><ul id='HEVg6'></ul><sub id='HEVg6'></sub></form><legend id='HEVg6'></legend><bdo id='HEVg6'><pre id='HEVg6'><center id='HEVg6'></center></pre></bdo></b><th id='HEVg6'></th></span></q></dt></tr></i><div id='HEVg6'><tfoot id='HEVg6'></tfoot><dl id='HEVg6'><fieldset id='HEVg6'></fieldset></dl></div>

                • 本文介绍了innoDB 表的 MySQL 全文搜索解决方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在设计一个使用 MySQL 作为其后端数据库的内部 Web 应用程序.数据的完整性至关重要,因此我使用 innoDB 引擎来实现其外键约束功能.

                  I'm designing an internal web application that uses MySQL as its backend database. The integrity of the data is crucial, so I am using the innoDB engine for its foreign key constraint features.

                  我想对一种类型的记录进行全文搜索,而 innoDB 表本身并不支持这种类型的记录.我不愿意转向 MyISAM 表,因为它们缺乏外键支持,而且它们的锁定是按表而不是按行进行的.

                  I want to do a full-text search of one type of records, and that is not supported natively with innoDB tables. I'm not willing to move to MyISAM tables due to their lack of foreign key support and due to the fact that their locking is per table, not per row.

                  创建我需要使用 MyISAM 引擎搜索的记录的镜像表并将其用于全文搜索是否是不好的做法?通过这种方式,我只是搜索数据的副本,如果该数据发生任何问题,也没什么大不了的,因为它总是可以重新创建的.

                  Would it be bad practice to create a mirrored table of the records I need to search using the MyISAM engine and use that for the full-text search? This way I'm just searching a copy of the data and if anything happens to that data it's not as big of a deal because it can always be re-created.

                  或者这是一种应该避免的尴尬方式吗?

                  Or is this an awkward way of doing this that should be avoided?

                  谢谢.

                  推荐答案

                  您也许能够使用触发器进行某种数据同步(如果您的 mysql 版本支持它们).它们允许您在某些点运行 SQL 的小片段,例如在表中插入或删除数据之后.

                  You might be able to do some kind of data sync using triggers (if your version of mysql supports them). They allow you to run small snippets of SQL at certain points such as after data is inserted into or deleted from a table.

                  例如...

                  create trigger TRIGGER_NAME after insert on INNODB_TABLE
                  insert into MYISAM_TABLE select * from INNODB_TABLE
                  where id = last_insert_id();
                  

                  ... 每当数据插入到 INNODB 表时,相同的数据就会自动插入到 MYISAM 表中.

                  ... Whenever data is inserted into the INNODB table, the same data is automatically inserted into the MYISAM table.

                  这篇关于innoDB 表的 MySQL 全文搜索解决方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Set the variable result, from query(设置变量结果,来自查询)
                  What is dynamic SQL?(什么是动态 SQL?)
                  Mysql - How to quit/exit from stored procedure(Mysql - 如何退出/退出存储过程)
                  Does MySQL have time-based triggers?(MySQL 有基于时间的触发器吗?)
                  is it possible to call a sql script from a stored procedure in another sql script?(是否可以从另一个 sql 脚本中的存储过程调用 sql 脚本?)
                  Procedure to loop through comma separated string is not working(遍历逗号分隔字符串的过程不起作用)
                • <legend id='sD1mA'><style id='sD1mA'><dir id='sD1mA'><q id='sD1mA'></q></dir></style></legend>
                      <tbody id='sD1mA'></tbody>
                      <bdo id='sD1mA'></bdo><ul id='sD1mA'></ul>

                        <i id='sD1mA'><tr id='sD1mA'><dt id='sD1mA'><q id='sD1mA'><span id='sD1mA'><b id='sD1mA'><form id='sD1mA'><ins id='sD1mA'></ins><ul id='sD1mA'></ul><sub id='sD1mA'></sub></form><legend id='sD1mA'></legend><bdo id='sD1mA'><pre id='sD1mA'><center id='sD1mA'></center></pre></bdo></b><th id='sD1mA'></th></span></q></dt></tr></i><div id='sD1mA'><tfoot id='sD1mA'></tfoot><dl id='sD1mA'><fieldset id='sD1mA'></fieldset></dl></div>
                      1. <tfoot id='sD1mA'></tfoot>

                          <small id='sD1mA'></small><noframes id='sD1mA'>