{"id":168991,"date":"2024-11-06T17:58:33","date_gmt":"2024-11-06T09:58:33","guid":{"rendered":"https:\/\/server.hk\/cnblog\/168991\/"},"modified":"2024-11-06T17:58:34","modified_gmt":"2024-11-06T09:58:34","slug":"%e9%9d%a2%e8%a9%a6%e5%ae%98%e5%95%8f%e6%88%91-innodb-%e7%9a%84%e7%89%a9%e7%90%86%e5%ad%98%e5%84%b2%e7%b5%90%e6%a7%8b%ef%bc%81","status":"publish","type":"post","link":"https:\/\/server.hk\/cnblog\/168991\/","title":{"rendered":"\u9762\u8a66\u5b98\u554f\u6211 InnoDB \u7684\u7269\u7406\u5b58\u5132\u7d50\u69cb\uff01"},"content":{"rendered":"<h1 id=\"%e9%9d%a2%e8%a9%a6%e5%ae%98%e5%95%8f%e6%88%91-innodb-%e7%9a%84%e7%89%a9%e7%90%86%e5%ad%98%e5%84%b2%e7%b5%90%e6%a7%8b%ef%bc%81-umzcrVBpyF\">\u9762\u8a66\u5b98\u554f\u6211 InnoDB \u7684\u7269\u7406\u5b58\u5132\u7d50\u69cb\uff01<\/h1>\n<p>\u5728\u8cc7\u6599\u5eab\u7ba1\u7406\u7cfb\u7d71\u4e2d\uff0cInnoDB \u662f MySQL \u7684\u4e00\u500b\u91cd\u8981\u5b58\u5132\u5f15\u64ce\uff0c\u56e0\u5176\u652f\u6301\u4e8b\u52d9\u3001\u884c\u7d1a\u9396\u5b9a\u548c\u5916\u9375\u7b49\u7279\u6027\u800c\u5ee3\u53d7\u6b61\u8fce\u3002\u7576\u9762\u8a66\u5b98\u8a62\u554f InnoDB \u7684\u7269\u7406\u5b58\u5132\u7d50\u69cb\u6642\uff0c\u4e86\u89e3\u5176\u5167\u90e8\u904b\u4f5c\u539f\u7406\u5c07\u6709\u52a9\u65bc\u56de\u7b54\u554f\u984c\u4e26\u5c55\u793a\u4f60\u7684\u5c08\u696d\u77e5\u8b58\u3002<\/p>\n<h2 id=\"innodb-%e7%9a%84%e7%89%a9%e7%90%86%e5%ad%98%e5%84%b2%e7%b5%90%e6%a7%8b%e6%a6%82%e8%bf%b0-umzcrVBpyF\">InnoDB \u7684\u7269\u7406\u5b58\u5132\u7d50\u69cb\u6982\u8ff0<\/h2>\n<p>InnoDB \u7684\u7269\u7406\u5b58\u5132\u7d50\u69cb\u4e3b\u8981\u7531\u4ee5\u4e0b\u5e7e\u500b\u90e8\u5206\u7d44\u6210\uff1a<\/p>\n<ul>\n<li><strong>\u8868\u7a7a\u9593\uff08Tablespace\uff09<\/strong><\/li>\n<li><strong>\u9801\uff08Page\uff09<\/strong><\/li>\n<li><strong>\u884c\uff08Row\uff09<\/strong><\/li>\n<li><strong>\u7d22\u5f15\uff08Index\uff09<\/strong><\/li>\n<\/ul>\n<h3 id=\"1-%e8%a1%a8%e7%a9%ba%e9%96%93%ef%bc%88tablespace%ef%bc%89-umzcrVBpyF\">1. \u8868\u7a7a\u9593\uff08Tablespace\uff09<\/h3>\n<p>\u8868\u7a7a\u9593\u662f InnoDB \u5b58\u5132\u6578\u64da\u7684\u908f\u8f2f\u5bb9\u5668\u3002\u6bcf\u500b\u8868\u90fd\u53ef\u4ee5\u5728\u4e00\u500b\u7368\u7acb\u7684\u8868\u7a7a\u9593\u4e2d\u5b58\u5132\u6578\u64da\uff0c\u9019\u6a23\u53ef\u4ee5\u63d0\u9ad8\u6578\u64da\u7684\u7ba1\u7406\u9748\u6d3b\u6027\u3002InnoDB \u652f\u6301\u5169\u7a2e\u8868\u7a7a\u9593\uff1a<\/p>\n<ul>\n<li><strong>\u5171\u4eab\u8868\u7a7a\u9593<\/strong>\uff1a\u6240\u6709\u8868\u7684\u6578\u64da\u548c\u7d22\u5f15\u90fd\u5b58\u5132\u5728\u540c\u4e00\u500b\u8868\u7a7a\u9593\u4e2d\uff0c\u901a\u5e38\u662f <code>ibdata1<\/code> \u6587\u4ef6\u3002<\/li>\n<li><strong>\u7368\u7acb\u8868\u7a7a\u9593<\/strong>\uff1a\u6bcf\u500b\u8868\u90fd\u6709\u81ea\u5df1\u7684\u8868\u7a7a\u9593\uff0c\u6578\u64da\u548c\u7d22\u5f15\u5206\u5225\u5b58\u5132\u5728\u4e0d\u540c\u7684\u6587\u4ef6\u4e2d\u3002<\/li>\n<\/ul>\n<h3 id=\"2-%e9%a0%81%ef%bc%88page%ef%bc%89-umzcrVBpyF\">2. \u9801\uff08Page\uff09<\/h3>\n<p>InnoDB \u5c07\u6578\u64da\u5206\u70ba\u56fa\u5b9a\u5927\u5c0f\u7684\u9801\uff0c\u9ed8\u8a8d\u5927\u5c0f\u70ba 16KB\u3002\u6bcf\u500b\u9801\u53ef\u4ee5\u5b58\u5132\u591a\u884c\u6578\u64da\uff0c\u4e26\u4e14\u9801\u662f InnoDB \u7684\u57fa\u672c\u5b58\u5132\u55ae\u4f4d\u3002\u9801\u7684\u985e\u578b\u5305\u62ec\uff1a<\/p>\n<ul>\n<li><strong>\u6578\u64da\u9801\uff08Data Page\uff09<\/strong>\uff1a\u5b58\u5132\u8868\u4e2d\u7684\u5be6\u969b\u6578\u64da\u3002<\/li>\n<li><strong>\u7d22\u5f15\u9801\uff08Index Page\uff09<\/strong>\uff1a\u5b58\u5132\u7d22\u5f15\u4fe1\u606f\u3002<\/li>\n<li><strong>\u7cfb\u7d71\u9801\uff08System Page\uff09<\/strong>\uff1a\u5b58\u5132 InnoDB \u7684\u5143\u6578\u64da\u3002<\/li>\n<\/ul>\n<h3 id=\"3-%e8%a1%8c%ef%bc%88row%ef%bc%89-umzcrVBpyF\">3. \u884c\uff08Row\uff09<\/h3>\n<p>\u5728 InnoDB \u4e2d\uff0c\u6578\u64da\u884c\u7684\u5b58\u5132\u65b9\u5f0f\u53d6\u6c7a\u65bc\u8868\u7684\u8a2d\u8a08\u3002\u5c0d\u65bc <strong>\u805a\u7c07\u7d22\u5f15<\/strong>\uff0c\u6578\u64da\u884c\u5b58\u5132\u5728\u4e3b\u9375\u7d22\u5f15\u7684\u9801\u4e2d\uff1b\u800c\u5c0d\u65bc <strong>\u975e\u805a\u7c07\u7d22\u5f15<\/strong>\uff0c\u6578\u64da\u884c\u7684\u5b58\u5132\u4f4d\u7f6e\u5247\u7531\u7d22\u5f15\u6307\u5411\u3002<\/p>\n<h3 id=\"4-%e7%b4%a2%e5%bc%95%ef%bc%88index%ef%bc%89-umzcrVBpyF\">4. \u7d22\u5f15\uff08Index\uff09<\/h3>\n<p>InnoDB \u4f7f\u7528 B+ \u6a39\u7d50\u69cb\u4f86\u5b58\u5132\u7d22\u5f15\u3002\u805a\u7c07\u7d22\u5f15\u7684\u8449\u5b50\u7bc0\u9ede\u5305\u542b\u4e86\u6578\u64da\u884c\uff0c\u800c\u975e\u805a\u7c07\u7d22\u5f15\u7684\u8449\u5b50\u7bc0\u9ede\u5247\u5305\u542b\u4e86\u6307\u5411\u6578\u64da\u884c\u7684\u6307\u91dd\u3002\u9019\u7a2e\u7d50\u69cb\u4f7f\u5f97\u67e5\u8a62\u6548\u7387\u5927\u5e45\u63d0\u9ad8\uff0c\u7279\u5225\u662f\u5728\u7bc4\u570d\u67e5\u8a62\u6642\u3002<\/p>\n<h2 id=\"innodb-%e7%9a%84%e6%95%b8%e6%93%9a%e5%ad%98%e5%84%b2%e6%b5%81%e7%a8%8b-umzcrVBpyF\">InnoDB \u7684\u6578\u64da\u5b58\u5132\u6d41\u7a0b<\/h2>\n<p>\u7576\u6578\u64da\u88ab\u63d2\u5165\u5230 InnoDB \u4e2d\u6642\uff0c\u9996\u5148\u6703\u88ab\u5beb\u5165\u5230\u7de9\u885d\u6c60\uff08Buffer Pool\uff09\uff0c\u7136\u5f8c\u518d\u7570\u6b65\u5beb\u5165\u5230\u78c1\u789f\u3002\u9019\u6a23\u7684\u8a2d\u8a08\u53ef\u4ee5\u63d0\u9ad8\u6027\u80fd\uff0c\u56e0\u70ba\u78c1\u789f I\/O \u64cd\u4f5c\u76f8\u5c0d\u8f03\u6162\u3002InnoDB \u9084\u4f7f\u7528\u4e86\u91cd\u505a\u65e5\u8a8c\uff08Redo Log\uff09\u4f86\u78ba\u4fdd\u6578\u64da\u7684\u6301\u4e45\u6027\uff0c\u4e26\u5728\u7cfb\u7d71\u5d29\u6f70\u6642\u9032\u884c\u6062\u5fa9\u3002<\/p>\n<h2 id=\"%e7%b8%bd%e7%b5%90-umzcrVBpyF\">\u7e3d\u7d50<\/h2>\n<p>\u4e86\u89e3 InnoDB \u7684\u7269\u7406\u5b58\u5132\u7d50\u69cb\u5c0d\u65bc\u8cc7\u6599\u5eab\u7ba1\u7406\u548c\u6027\u80fd\u512a\u5316\u81f3\u95dc\u91cd\u8981\u3002\u638c\u63e1\u8868\u7a7a\u9593\u3001\u9801\u3001\u884c\u548c\u7d22\u5f15\u7684\u6982\u5ff5\uff0c\u80fd\u5920\u5e6b\u52a9\u958b\u767c\u8005\u66f4\u597d\u5730\u8a2d\u8a08\u548c\u7ba1\u7406\u8cc7\u6599\u5eab\u3002\u82e5\u60a8\u5c0d\u65bc <a href=\"https:\/\/server.hk\">\u9999\u6e2f VPS<\/a> \u53ca\u5176\u76f8\u95dc\u670d\u52d9\u6709\u8208\u8da3\uff0c\u8acb\u8a2a\u554f\u6211\u5011\u7684\u7db2\u7ad9\u4ee5\u7372\u53d6\u66f4\u591a\u8cc7\u8a0a\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e86\u89e3 InnoDB \u7684\u7269\u7406\u5b58\u5132\u7d50\u69cb\uff0c\u638c\u63e1\u9801\u9762\u3001\u6bb5\u843d\u548c\u8868\u7a7a\u9593\u7684\u904b\u4f5c\uff0c\u63d0\u5347\u9762\u8a66\u8868\u73fe\uff0c\u61c9\u5c0d\u6280\u8853\u554f\u984c\u6311\u6230\u3002<\/p>\n","protected":false},"author":0,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[101],"tags":[],"class_list":["post-168991","post","type-post","status-publish","format-standard","hentry","category-database"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/168991","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/types\/post"}],"replies":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/comments?post=168991"}],"version-history":[{"count":1,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/168991\/revisions"}],"predecessor-version":[{"id":168992,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/168991\/revisions\/168992"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=168991"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=168991"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=168991"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}