{"id":315950,"date":"2024-01-20T09:18:26","date_gmt":"2024-01-20T01:18:26","guid":{"rendered":"https:\/\/www.idc.net\/help\/315950\/"},"modified":"2024-01-20T09:18:26","modified_gmt":"2024-01-20T01:18:26","slug":"mysql%e6%95%b0%e6%8d%ae%e5%ba%93%e4%b8%ad%e7%9a%84%e4%b8%89%e4%b8%aa%e5%bc%95%e6%93%8e","status":"publish","type":"post","link":"https:\/\/idc.net\/help\/315950\/","title":{"rendered":"MySQL\u6570\u636e\u5e93\u4e2d\u7684\u4e09\u4e2a\u5f15\u64ce"},"content":{"rendered":"<p>\u4ee5\u4e0b\u7684\u6587\u7ae0\u4e3b\u8981\u4ecb\u7ecd\u7684\u662f\u5bf9MySQL\u6570\u636e\u5e93\u652f\u6301\u76843\u4e2a\u5b9e\u9645\u5e94\u7528\u5f15\u64ce\u7684\u5de7\u5999\u63a5\u89e6\uff0c\u5982\u679c\u4f60\u5bf9MySQL\u6570\u636e\u5e93\u652f\u6301\u76843\u4e2a\u5b9e\u9645\u5e94\u7528\u5f15\u64ce\u7684\u5b9e\u9645\u5e94\u7528\u5f88\u611f\u5174\u8da3\u7684\u8bdd\uff0c\u4f60\u5c31\u53ef\u4ee5\u6d4f\u89c8\u4ee5\u4e0b\u7684\u6587\u7ae0\u4e86\uff0c\u671b\u4f60\u4f1a\u6709\u6240\u6536\u83b7\u3002<\/p>\n<p>ISAM\u662f\u4e00\u4e2a\u5b9a\u4e49\u660e\u786e\u4e14\u5386\u7ecf\u65f6\u95f4\u8003\u9a8c\u7684\u6570\u636e\u8868\u683c\u7ba1\u7406\u65b9\u6cd5\uff0c\u5b83\u5728\u8bbe\u8ba1\u4e4b\u65f6\u5c31\u8003\u8651\u5230MySQL\u6570\u636e\u5e93\u88ab\u67e5\u8be2\u7684\u6b21\u6570\u8981\u8fdc\u5927\u4e8e\u66f4\u65b0\u7684\u6b21\u6570\u3002\u56e0\u6b64\uff0cISAM\u6267\u884c\u8bfb\u53d6\u64cd\u4f5c\u7684\u901f\u5ea6\u5f88\u5feb\uff0c\u800c\u4e14\u4e0d\u5360\u7528\u5927\u91cf\u7684\u5185\u5b58\u548c\u5b58\u50a8\u8d44\u6e90\u3002<\/p>\n<p>ISAM\u7684\u4e24\u4e2a\u4e3b\u8981\u4e0d\u8db3\u4e4b\u5904\u5728\u4e8e\uff0c\u5b83\u4e0d\u652f\u6301\u4e8b\u52a1\u5904\u7406\uff0c\u4e5f\u4e0d\u80fd\u591f\u5bb9\u9519\uff1a\u5982\u679c\u4f60\u7684\u786c\u76d8\u5d29\u6e83\u4e86\uff0c\u90a3\u4e48\u6570\u636e\u6587\u4ef6\u5c31\u65e0\u6cd5\u6062\u590d\u4e86\u3002\u5982\u679c\u4f60\u6b63\u5728\u628aISAM\u7528\u5728\u5173\u952e\u4efb\u52a1\u5e94\u7528\u7a0b\u5e8f\u91cc\uff0c\u90a3\u5c31\u5fc5\u987b\u7ecf\u5e38\u5907\u4efd\u4f60\u6240\u6709\u7684\u5b9e\u65f6\u6570\u636e\uff0c\u901a\u8fc7\u5176\u590d\u5236\u7279\u6027\uff0cMySQL(\u548cPHP\u642d\u914d\u4e4b\u6700\u4f73\u7ec4\u5408)\u80fd\u591f\u652f\u6301\u8fd9\u6837\u7684\u5907\u4efd\u5e94\u7528\u7a0b\u5e8f\u3002<\/p>\n<p><strong>MyISAM<\/strong><\/p>\n<p>MyISAM\u662fMySQL(\u548cPHP\u642d\u914d\u4e4b\u6700\u4f73\u7ec4\u5408)\u7684ISAM\u6269\u5c55\u683c\u5f0f\u548c\u7f3a\u7701\u7684\u6570\u636e\u5e93\u5f15\u64ce\u3002\u9664\u4e86\u63d0\u4f9bISAM\u91cc\u6240\u6ca1\u6709\u7684\u7d22\u5f15\u548c\u5b57\u6bb5\u7ba1\u7406\u7684\u5927\u91cf\u529f\u80fd\uff0cMyISAM\u8fd8\u4f7f\u7528\u4e00\u79cd\u8868\u683c\u9501\u5b9a\u7684\u673a\u5236\uff0c\u6765\u4f18\u5316\u591a\u4e2a\u5e76\u53d1\u7684\u8bfb\u5199\u64cd\u4f5c\u3002\u5176\u4ee3\u4ef7\u662f\u4f60\u9700\u8981\u7ecf\u5e38\u8fd0\u884cOPTIMIZE TABLE\u547d\u4ee4\uff0c\u6765\u6062\u590d\u88ab\u66f4\u65b0\u673a\u5236\u6240\u6d6a\u8d39\u7684\u7a7a\u95f4\u3002<\/p>\n<p>MyISAM\u8fd8\u6709\u4e00\u4e9b\u6709\u7528\u7684\u6269\u5c55\uff0c\u4f8b\u5982\u7528\u6765\u4fee\u590dMySQL\u6570\u636e\u5e93\u6587\u4ef6\u7684MyISAMChk\u5de5\u5177\u548c\u7528\u6765\u6062\u590d\u6d6a\u8d39\u7a7a\u95f4\u7684MyISAMPack\u5de5\u5177\u3002<\/p>\n<p>MyISAM\u5f3a\u8c03\u4e86\u5feb\u901f\u8bfb\u53d6\u64cd\u4f5c\uff0c\u8fd9\u53ef\u80fd\u5c31\u662f\u4e3a\u4ec0\u4e48MySQL(\u548cPHP\u642d\u914d\u4e4b\u6700\u4f73\u7ec4\u5408)\u53d7\u5230\u4e86Web\u5f00\u53d1\u5982\u6b64\u9752\u7750\u7684\u4e3b\u8981\u539f\u56e0\uff1a\u5728Web\u5f00\u53d1\u4e2d\u4f60\u6240\u8fdb\u884c\u7684\u5927\u91cf\u6570\u636e\u64cd\u4f5c\u90fd\u662f\u8bfb\u53d6\u64cd\u4f5c\u3002\u6240\u4ee5\uff0c\u5927\u591a\u6570\u865a\u62df\u4e3b\u673a\u63d0\u4f9b\u5546\u548cInternet\u5e73\u53f0\u63d0\u4f9b\u5546(Internet Presence Provider\uff0cIPP)\u53ea\u5141\u8bb8\u4f7f\u7528MyISAM\u683c\u5f0f\u3002<\/p>\n<p><strong>HEAP<\/strong><\/p>\n<p>HEAP\u5141\u8bb8\u53ea\u9a7b\u7559\u5728\u5185\u5b58\u91cc\u7684\u4e34\u65f6\u8868\u683c\u3002\u9a7b\u7559\u5728\u5185\u5b58\u91cc\u8ba9HEAP\u8981\u6bd4ISAM\u548cMyISAM\u90fd\u5feb\uff0c\u4f46\u662f\u5b83\u6240\u7ba1\u7406\u7684\u6570\u636e\u662f\u4e0d\u7a33\u5b9a\u7684\uff0c\u800c\u4e14\u5982\u679c\u5728\u5173\u673a\u4e4b\u524d\u6ca1\u6709\u8fdb\u884c\u4fdd\u5b58\uff0c\u90a3\u4e48\u6240\u6709\u7684\u6570\u636e\u90fd\u4f1a\u4e22\u5931\u3002\u5728\u6570\u636e\u884c\u88ab\u5220\u9664\u7684\u65f6\u5019\uff0cHEAP\u4e5f\u4e0d\u4f1a\u6d6a\u8d39\u5927\u91cf\u7684\u7a7a\u95f4\u3002HEAP\u8868\u683c\u5728\u4f60\u9700\u8981\u4f7f\u7528SELECT\u8868\u8fbe\u5f0f\u6765\u9009\u62e9\u548c\u64cd\u63a7\u6570\u636e\u7684\u65f6\u5019\u975e\u5e38\u6709\u7528\u3002\u8981\u8bb0\u4f4f\uff0c\u5728\u7528\u5b8c\u8868\u683c\u4e4b\u540e\u5c31\u5220\u9664\u8868\u683c\u3002\u8ba9\u6211\u518d\u91cd\u590d\u4e00\u904d\uff1a\u5728\u4f60\u7528\u5b8c\u8868\u683c\u4e4b\u540e\uff0c\u4e0d\u8981\u5fd8\u8bb0\u5220\u9664\u8868\u683c\u3002<\/p>\n<p><strong>InnoDB\u548cBerkley DB<\/strong><\/p>\n<p>InnoDB\u548cBerkley DB(BDB)MySQL\u6570\u636e\u5e93\u5f15\u64ce\u90fd\u662f\u9020\u5c31MySQL(\u548cPHP\u642d\u914d\u4e4b\u6700\u4f73\u7ec4\u5408)\u7075\u6d3b\u6027\u7684\u6280\u672f\u7684\u76f4\u63a5\u4ea7\u54c1\uff0c\u8fd9\u9879\u6280\u672f\u5c31\u662fMySQL(\u548cPHP\u642d\u914d\u4e4b\u6700\u4f73\u7ec4\u5408)++ API\u3002\u5728\u4f7f\u7528MySQL(\u548cPHP\u642d\u914d\u4e4b\u6700\u4f73\u7ec4\u5408)\u7684\u65f6\u5019\uff0c\u4f60\u6240\u9762\u5bf9\u7684\u6bcf\u4e00\u4e2a\u6311\u6218\u51e0\u4e4e\u90fd\u6e90\u4e8eISAM\u548cMyISAM\u6570\u636e\u5e93\u5f15\u64ce\u4e0d\u652f\u6301\u4e8b\u52a1\u5904\u7406\u4e5f\u4e0d\u652f\u6301\u5916\u6765\u952e\u3002<\/p>\n<p>\u5c3d\u7ba1\u8981\u6bd4ISAM\u548cMyISAM\u5f15\u64ce\u6162\u5f88\u591a\uff0c\u4f46\u662fInnoDB\u548cBDB\u5305\u62ec\u4e86\u5bf9\u4e8b\u52a1\u5904\u7406\u548c\u5916\u6765\u952e\u7684\u652f\u6301\uff0c\u8fd9\u4e24\u70b9\u90fd\u662f\u524d\u4e24\u4e2a\u5f15\u64ce\u6240\u6ca1\u6709\u7684\u3002\u5982\u524d\u6240\u8ff0\uff0c\u5982\u679c\u4f60\u7684\u8bbe\u8ba1\u9700\u8981\u8fd9\u4e9b\u7279\u6027\u4e2d\u7684\u4e00\u8005\u6216\u8005\u4e24\u8005\uff0c\u90a3\u4f60\u5c31\u8981\u88ab\u8feb\u4f7f\u7528\u540e\u4e24\u4e2a\u5f15\u64ce\u4e2d\u7684\u4e00\u4e2a\u4e86\u3002<\/p>\n<p>\u3010\u7f16\u8f91\u63a8\u8350\u3011<\/p>\n<ol>\n<li>\u6062\u590dMySQL\u6570\u636e\u5e93root\u5bc6\u78012\u65b9\u6848<\/li>\n<li>MySQL\u67e5\u8be2\u4f18\u5316\u76845\u4e2a\u597d\u7528\u65b9\u6cd5<\/li>\n<li>MySQLunion \u8bed\u6cd5\u4ee3\u7801\u6f14\u793a<\/li>\n<li>MySQL\u4fee\u6539\u8868\u7ed3\u6784alter \u5b9e\u64cd<\/li>\n<li>Mysql\u4e34\u65f6\u8868\u8fd0\u884c\u662f\u9700\u8981\u7684\u4ee3\u7801\u6709\u90a3\u4e9b\uff1f<br \/> &nbsp;<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>\u4ee5\u4e0b\u7684\u6587\u7ae0\u4e3b\u8981\u4ecb\u7ecd\u7684\u662f\u5bf9MySQL\u6570\u636e\u5e93\u652f\u6301\u76843\u4e2a\u5b9e\u9645\u5e94\u7528\u5f15\u64ce\u7684\u5de7\u5999\u63a5\u89e6\uff0c\u5982\u679c\u4f60\u5bf9MySQL\u6570\u636e\u5e93\u652f\u6301\u76843\u4e2a\u5b9e [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7038],"tags":[],"class_list":["post-315950","post","type-post","status-publish","format-standard","hentry","category-database"],"_links":{"self":[{"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/posts\/315950","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/comments?post=315950"}],"version-history":[{"count":0,"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/posts\/315950\/revisions"}],"wp:attachment":[{"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/media?parent=315950"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/categories?post=315950"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/tags?post=315950"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}