{"id":7736,"date":"2023-11-28T19:56:04","date_gmt":"2023-11-28T11:56:04","guid":{"rendered":"https:\/\/wx.kaifamiao.info\/?p=7736"},"modified":"2023-11-28T19:56:08","modified_gmt":"2023-11-28T11:56:08","slug":"mysql-zhong-zen-me-kan-dao-wei-biao-ge-ding-yi-de","status":"publish","type":"post","link":"http:\/\/wx.kaifamiao.info\/index.php\/2023\/11\/28\/mysql-zhong-zen-me-kan-dao-wei-biao-ge-ding-yi-de\/","title":{"rendered":"MySQL\u4e2d\u600e\u4e48\u770b\u5230\u4e3a\u8868\u683c\u5b9a\u4e49\u7684\u6240\u6709\u7d22\u5f15?"},"content":{"rendered":"<p>\u7d22\u5f15\u662f\u901a\u8fc7\u4ee5\u4e0b\u65b9\u5f0f\u4e3a\u8868\u683c\u5b9a\u4e49\u7684\uff1a<br \/>\nSHOW INDEX FROM table_name<br \/>\nMySQL \u4e2d\u7684 Explain \u4e86\u89e3\u5417\uff1f<br \/>\nExplain\u6267\u884c\u8ba1\u5212\u5305\u542b\u5b57\u6bb5\u4fe1\u606f\u5982\u4e0b\uff1a\u5206\u522b\u662fid\u3001select_type\u3001table\u3001partitions\u3001type\u3001possible_keys\u3001key\u3001key_len\u3001ref\u3001rows\u3001filtered\u3001Extra \u7b49 12 \u4e2a\u5b57\u6bb5\u3002<br \/>\n\u6211\u4eec\u91cd\u70b9\u5173\u6ce8\u7684\u662ftype,\u5b83\u7684\u5c5e\u6027\u6392\u5e8f\u5982\u4e0b\uff1a<br \/>\nsystem &gt; const &gt; eq_ref &gt; ref &gt; ref_or_null &gt; index_merge &gt; unique_subquery &gt; index_subquery &gt; range &gt; index &gt; ALL<\/p>\n<p>MySQL\u5b58\u50a8\u5f15\u64ceMyISAM\u4e0eInnoDB\u533a\u522b\uff1f<br \/>\n\u5b58\u50a8\u5f15\u64ceStorage engine\uff1a MySQL\u4e2d\u7684\u6570\u636e\u3001\u7d22\u5f15\u4ee5\u53ca\u5176\u4ed6\u5bf9\u8c61\u662f\u5982\u4f55\u5b58\u50a8\u7684\uff0c\u662f\u4e00\u5957\u6587\u4ef6\u7cfb\u7edf\u7684\u5b9e\u73b0\u3002<br \/>\n\u5e38\u7528\u7684\u5b58\u50a8\u5f15\u64ce\u6709\u4ee5\u4e0b\uff1a<br \/>\nInnodb\u5f15\u64ce\uff1aInnodb\u5f15\u64ce\u63d0\u4f9b\u4e86\u5bf9\u6570\u636e\u5e93ACID\u4e8b\u52a1\u7684\u652f\u6301\u3002\u5e76\u4e14\u8fd8\u63d0\u4f9b\u4e86\u884c\u7ea7\u9501\u548c\u5916\u952e\u7684\u7ea6\u675f\u3002\u5b83\u7684\u8bbe\u8ba1\u7684\u76ee\u6807\u5c31\u662f\u5904\u7406\u5927\u6570\u636e\u5bb9\u91cf\u7684\u6570\u636e\u5e93\u7cfb\u7edf\u3002<br \/>\nMylASM\u5f15\u64ce\uff08\u539f\u672cMySQL\u7684\u9ed8\u8ba4\u5f15\u64ce\uff09\uff1a\u4e0d\u63d0\u4f9b\u4e8b\u52a1\u7684\u652f\u6301\uff0c\u4e5f\u4e0d\u652f\u6301\u884c\u7ea7\u9501\u548c\u5916\u952e\u3002<br \/>\nMEMORY\u5f15\u64ce\uff1a\u6240\u6709\u7684\u6570\u636e\u90fd\u5728\u5185\u5b58\u4e2d\uff0c\u6570\u636e\u7684\u5904\u7406\u901f\u5ea6\u5feb\uff0c\u4f46\u662f\u5b89\u5168\u6027\u4e0d\u9ad8\u3002<br \/>\nMySQL, Oracle, Sql Server \u7684\u533a\u522b\uff1f<br \/>\n1\u3001\tSql Server\u53ea\u80fd\u5728Windows\u4e0a\u4f7f\u7528\uff0c\u800cMySQL\u548cOracle\u53ef\u4ee5\u5728\u5176\u4ed6\u7cfb\u7edf\u4e0a\u4f7f\u7528\uff0c\u800c\u4e14\u53ef\u4ee5\u652f\u6301\u6570\u636e\u5e93\u4e0d\u540c\u7cfb\u7edf\u4e4b\u95f4\u7684\u79fb\u690d<br \/>\n2\u3001\tMySQL \u5f00\u6e90\u514d\u8d39\u7684\uff0cSql Server \u548c Oracle \u8981\u94b1\u3002<br \/>\n3\u3001\t\u6211\u4ece\u5c0f\u5230\u5927\u6392\u5e8f\u54c8\uff0cMySQL\u5f88\u5c0f\uff0cSql Server\u5c45\u4e2d\uff0cOracle\u6700\u5927<br \/>\n4\u3001\tOracle\u652f\u6301\u5927\u5e76\u53d1\u91cf\uff0c\u5927\u8bbf\u95ee\u91cf\uff0cSql Server\u8fd8\u884c\uff0c\u800cMySQL\u7684\u8bdd\u538b\u529b\u6ca1\u8fd9\u4e48\u5927\uff0c\u56e0\u6b64\u73b0\u5728\u7684MySQL\u7684\u8bdd\u6700\u597d\u662f\u8981\u4f7f\u7528\u96c6\u7fa4\u6216\u8005\u7f13\u5b58\u6765\u642d\u914d\u4f7f\u7528<br \/>\n5,Oracle\u652f\u6301\u591a\u7528\u6237\u4e0d\u540c\u6743\u9650\u6765\u8fdb\u884c\u64cd\u4f5c\uff0c\u800cMySQL\u53ea\u8981\u6709\u767b\u5f55\u6743\u9650\u5c31\u53ef\u64cd\u4f5c\u5168\u90e8\u6570\u636e\u5e93<br \/>\n6\u3001\t\u5b89\u88c5\u6240\u7528\u7684\u7a7a\u95f4\u5dee\u522b\u4e5f\u662f\u5f88\u5927\u7684\uff0cMySQL\u5b89\u88c5\u5b8c\u540e\u624d\u51e0\u767eM\u800cOracle\u6709\u51e0G\u5de6\u53f3\uff0c\u4e14\u4f7f\u7528\u7684\u65f6\u5019Oracle\u5360\u7528\u7279\u522b\u5927\u7684\u5185\u5b58\u7a7a\u95f4\u548c\u5176\u4ed6\u673a\u5668\u6027\u80fd\u3002<br \/>\n7,\u505a\u5206\u9875\u7684\u8bdd\uff0cMySQL \u4f7f\u7528 Limit, Sql Server \u4f7f\u7528 top, Oracle \u4f7f\u7528 row<br \/>\n8,Oracle\u6ca1\u6709\u81ea\u52a8\u589e\u957f\u7c7b\u578b\uff0cMySQL\u548cSql Server \u2014\u822c\u4f7f\u7528\u81ea\u52a8\u589e\u957f\u7c7b\u578b<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u7d22\u5f15\u662f\u901a\u8fc7\u4ee5\u4e0b\u65b9\u5f0f\u4e3a\u8868\u683c\u5b9a\u4e49\u7684\uff1a SHOW INDEX FROM table_name MySQL \u4e2d\u7684 Ex [&hellip;]<\/p>\n","protected":false},"author":7,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[102],"tags":[],"class_list":["post-7736","post","type-post","status-publish","format-standard","hentry","category-db"],"_links":{"self":[{"href":"http:\/\/wx.kaifamiao.info\/index.php\/wp-json\/wp\/v2\/posts\/7736","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/wx.kaifamiao.info\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/wx.kaifamiao.info\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/wx.kaifamiao.info\/index.php\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"http:\/\/wx.kaifamiao.info\/index.php\/wp-json\/wp\/v2\/comments?post=7736"}],"version-history":[{"count":1,"href":"http:\/\/wx.kaifamiao.info\/index.php\/wp-json\/wp\/v2\/posts\/7736\/revisions"}],"predecessor-version":[{"id":7737,"href":"http:\/\/wx.kaifamiao.info\/index.php\/wp-json\/wp\/v2\/posts\/7736\/revisions\/7737"}],"wp:attachment":[{"href":"http:\/\/wx.kaifamiao.info\/index.php\/wp-json\/wp\/v2\/media?parent=7736"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/wx.kaifamiao.info\/index.php\/wp-json\/wp\/v2\/categories?post=7736"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/wx.kaifamiao.info\/index.php\/wp-json\/wp\/v2\/tags?post=7736"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}