text: (window.webpackJsonp=window.webpackJsonp||[]).push([[84],{746:function(t,v,_){"use strict";_.r(v);var n=_(2),r=Object(n.a)({},(function(){var t=this,v=t.$createElement,_=t._self._c||v;return _("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[_("h4",{attrs:{id:"myisam和innodb的区别"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#myisam和innodb的区别"}},[t._v("#")]),t._v(" MyISAM和InnoDB的区别")]),t._v(" "),_("p",[_("strong",[t._v("事务：")]),t._v(" MYISAM 不支持事务，INNODB 支持事务。")]),t._v(" "),_("p",[_("strong",[t._v("外键：")]),t._v(" MYISAM 不支持外键，INNODB支持外键")]),t._v(" "),_("p",[_("strong",[t._v("锁：")]),t._v(" MYISAM 是表锁，插入数据时，锁定整个表，查表总行数时，不需要全表扫描 。INNODB 是行锁，查表总行数时，全表扫描。")]),t._v(" "),_("p",[_("strong",[t._v("索引：")]),t._v(" InnoDB的数据文件本身就是索引文件（聚簇索引）。而MyISAM的索引和数据是分开的（非聚簇索引）。")]),t._v(" "),_("table",[_("thead",[_("tr",[_("th"),t._v(" "),_("th",[t._v("MYISAM")]),t._v(" "),_("th",[t._v("INNODB")])])]),t._v(" "),_("tbody",[_("tr",[_("td",[t._v("事务")]),t._v(" "),_("td",[t._v("不支持")]),t._v(" "),_("td",[t._v("支持")])]),t._v(" "),_("tr",[_("td",[t._v("外键")]),t._v(" "),_("td",[t._v("不支持")]),t._v(" "),_("td",[t._v("支持")])]),t._v(" "),_("tr",[_("td",[t._v("锁")]),t._v(" "),_("td",[t._v("表锁，插入数据时，锁定整个表")]),t._v(" "),_("td",[t._v("行锁")])]),t._v(" "),_("tr",[_("td",[t._v("索引")]),t._v(" "),_("td",[t._v("索引和数据是分开的（非聚簇索引）")]),t._v(" "),_("td",[t._v("数据文件本身就是索引文件（聚簇索引）")])])])])])}),[],!1,null,null,null);v.default=r.exports}}]);