为什么MySQL的MyISAM引擎不支持外键? [英] Why doesn't MySQL's MyISAM engine support Foreign keys?

查看:1920
本文介绍了为什么MySQL的MyISAM引擎不支持外键?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为我的研究写一个网络应用程序,包括全文搜索和外键。

I am writing a web-app for my studies which includes fulltext search and foreign keys.

我读过的地方,MyISAM引擎适用于全文搜索, 。

I have read somewhere, MyISAM engine is suitable for fulltext searching, and InnoDB for foreign keys.

在这种情况下,我应该使用什么引擎达到最佳性能?

In this situation what engine should I use for the best performance?


  • 为什么MyISAM不支持外键关系,而是InnoDB?

  • 为什么MyISAM支持全文搜索,但InnoDB不支持?


    • Why does MyISAM not support foreign key relationship but InnoDB does?
    • Why does MyISAM support full text search but InnoDB does not?

    推荐答案



    请告诉我,必须使用以提高性能?

    Kindly tell me, In this situation what engine I have to use for improve performance?

    每个存储引擎的性能将取决于您执行的查询。但是,请注意,同一数据库中的不同表格可以使用不同的存储引擎。

    The performance of each storage engine will depend on the queries you perform. However, be aware that different tables within the same database can use different storage engines.


    为什么MyISAM引擎不支持外键关系和InnoDB?

    Why MyISAM engine does not support foreign key relationship and InnoDB does?

    外键主要差异


    稍后,外键约束 MyISAM 表。

    因此,外键约束

    Therefore, foreign key constraints have simply not yet been implemented in MyISAM.

    EDIT :由于该注释已从文档中删除,因此似乎不再计划在 MyISAM 引擎中实现外键约束。

    EDIT: As that comment is removed from docs, it appears that it is no longer planned to implement foreign key constraints in MyISAM engine.



    < b $ b

    Why MyISAM engine does support full text search and InnoDB does not?

    MySQL 5.6中有什么新功能:

    As documented under What Is New in MySQL 5.6:


    您可以创建 FULLTEXT InnoDB 表上创建索引,并使用 MATCH()... AGAINST 语法。

    You can create FULLTEXT indexes on InnoDB tables, and query them using the MATCH() ... AGAINST syntax.

    因此,从MySQL 5.6开始, InnoDB 已执行全文搜索。

    Therefore, full text search has been implemented in InnoDB as of MySQL 5.6.

    这篇关于为什么MySQL的MyISAM引擎不支持外键?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆