{"id":101335,"date":"2026-09-06T17:09:30","date_gmt":"2026-09-06T09:09:30","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/101335.html"},"modified":"2026-09-06T17:09:30","modified_gmt":"2026-09-06T09:09:30","slug":"mysql-%e5%a4%8d%e5%90%88%e7%b4%a2%e5%bc%95%e6%b7%b1%e5%ba%a6%e5%89%96%e6%9e%90%ef%bc%9a%e6%9c%80%e5%b7%a6%e5%8c%b9%e9%85%8d%e3%80%81icp%e3%80%81%e5%9b%9e%e8%a1%a8%e3%80%81io-%e6%a8%a1%e5%bc%8f","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/101335.html","title":{"rendered":"MySQL \u590d\u5408\u7d22\u5f15\u6df1\u5ea6\u5256\u6790\uff1a\u6700\u5de6\u5339\u914d\u3001ICP\u3001\u56de\u8868\u3001IO \u6a21\u5f0f\u5e95\u5c42\u771f\u76f8"},"content":{"rendered":"<p>\u6458\u8981&#xff1a;\u7f51\u4e0a\u5927\u91cf\u6559\u7a0b\u53ea\u8bb2\u6700\u5de6\u5339\u914d\u53e3\u8bc0&#xff0c;\u5f88\u5c11\u8bb2\u5e95\u5c42 B&#043; \u6811\u3001\u7d22\u5f15\u4e0b\u63a8 ICP\u3001\u56de\u8868\u3001\u987a\u5e8f\/\u968f\u673a IO\u3001BufferPool \u4e4b\u95f4\u7684\u5b8c\u6574\u94fe\u8def\u3002\u672c\u6587\u7ed3\u5408 Explain \u6267\u884c\u8ba1\u5212\u3001\u5e95\u5c42\u5b58\u50a8\u539f\u7406&#xff0c;\u628a\u9762\u8bd5\u9ad8\u9891\u5751\u4e00\u6b21\u6027\u8bb2\u900f\u3002<\/p>\n<hr \/>\n<h3>\u524d\u7f6e\u51c6\u5907<\/h3>\n<p>\u5efa\u8868\u4e0e\u590d\u5408\u7d22\u5f15&#xff1a;<\/p>\n<p><span class=\"token keyword\">CREATE<\/span> <span class=\"token keyword\">TABLE<\/span> test<span class=\"token punctuation\">(<\/span><br \/>\n  id <span class=\"token keyword\">INT<\/span> <span class=\"token keyword\">PRIMARY<\/span> <span class=\"token keyword\">KEY<\/span> <span class=\"token keyword\">AUTO_INCREMENT<\/span><span class=\"token punctuation\">,<\/span><br \/>\n  a <span class=\"token keyword\">INT<\/span><span class=\"token punctuation\">,<\/span><br \/>\n  b <span class=\"token keyword\">INT<\/span><span class=\"token punctuation\">,<\/span><br \/>\n  c <span class=\"token keyword\">INT<\/span><br \/>\n<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token comment\">&#8212; \u521b\u5efa\u8054\u5408\u7d22\u5f15 idx(a,b,c)<\/span><br \/>\n<span class=\"token keyword\">CREATE<\/span> <span class=\"token keyword\">INDEX<\/span> idx_abc <span class=\"token keyword\">ON<\/span> test<span class=\"token punctuation\">(<\/span>a<span class=\"token punctuation\">,<\/span>b<span class=\"token punctuation\">,<\/span>c<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p>\u590d\u5408\u7d22\u5f15 idx(a,b,c) \u7684 B&#043; \u6811\u53f6\u5b50\u8282\u70b9&#xff0c;\u6392\u5e8f\u89c4\u5219\u662f&#xff1a;\u4f18\u5148\u6309 a \u6392\u5e8f&#xff1b;a \u76f8\u7b49&#xff0c;\u6309 b \u6392\u5e8f&#xff1b;b \u76f8\u7b49&#xff0c;\u6309 c \u6392\u5e8f&#xff1b;\u53f6\u5b50\u884c\u672b\u5c3e\u9644\u5e26\u4e3b\u952e id\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/09\/20260906090928-6a9d2dc8362ad.gif\" alt=\"\u590d\u5408\u7d22\u5f15\u53f6\u5b50\u6392\u5e8f\u89c4\u5219\" \/><\/p>\n<p>\u4e0a\u56fe\u6f14\u793a\u4e86\u590d\u5408\u7d22\u5f15\u53f6\u5b50\u9875\u7684\u6392\u5e8f\u903b\u8f91\u3002\u4ece\u56fe\u4e2d\u53ef\u4ee5\u770b\u5230&#xff1a;a \u76f8\u540c\u7684\u884c\u88ab\u5206\u5230\u540c\u4e00\u7ec4&#xff1b;a \u76f8\u540c\u540e\u6309 b \u6392\u5e8f&#xff1b;\u53ea\u6709 (a,b) \u90fd\u76f8\u540c\u65f6&#xff0c;c \u624d\u6709\u5e8f\u3002\u884c\u5c3e\u7684\u4e3b\u952e id \u662f\u540e\u7eed\u56de\u8868\u7684\u201c\u94a5\u5319\u201d\u3002<\/p>\n<p>\u56e0\u679c\u94fe&#xff1a;\u56e0\u4e3a InnoDB \u7684 B&#043; \u6811\u53f6\u5b50\u884c\u6309 (a,b,c) \u5168\u5c40\u6709\u5e8f \u2192 \u6240\u4ee5\u7d22\u5f15\u5b9a\u4f4d\u65f6\u53ef\u4ee5\u4ece a \u5f00\u59cb\u4e8c\u5206\u67e5\u627e \u2192 \u4f46\u56e0\u4e3a\u6392\u5e8f\u4f18\u5148\u7ea7\u662f a\u2192b\u2192c \u4f9d\u6b21\u9012\u51cf \u2192 \u6240\u4ee5\u4e00\u65e6 a \u6216 b \u51fa\u73b0\u8303\u56f4\u67e5\u8be2&#xff0c;c \u5728\u53f6\u5b50\u5185\u90e8\u5c31\u4e0d\u518d\u6709\u5e8f\u3002<\/p>\n<hr \/>\n<h3>\u4e00\u3001\u4ec0\u4e48\u662f\u6700\u5de6\u5339\u914d&#xff08;\u6700\u5de6\u524d\u7f00\u539f\u5219&#xff09;<\/h3>\n<p>\u6838\u5fc3&#xff1a;\u590d\u5408\u7d22\u5f15\u8981\u4ece\u7d22\u5f15\u5b9a\u4e49\u7684\u6700\u5de6\u4fa7\u5b57\u6bb5\u5f00\u59cb&#xff0c;\u5339\u914d\u8fde\u7eed\u524d\u7f00&#xff1b;SQL \u7684 where \u6761\u4ef6\u4e66\u5199\u987a\u5e8f\u4e0d\u5f71\u54cd\u7d22\u5f15\u547d\u4e2d&#xff0c;\u4f18\u5316\u5668\u4f1a\u81ea\u52a8\u8c03\u6574\u6761\u4ef6\u987a\u5e8f\u3002<\/p>\n<p>\u2705 \u53ef\u4ee5\u6709\u6548\u4f7f\u7528\u7d22\u5f15\u524d\u7f00&#xff1a;<\/p>\n<p><span class=\"token keyword\">where<\/span> a<span class=\"token operator\">&#061;<\/span><span class=\"token number\">1<\/span><br \/>\n<span class=\"token keyword\">where<\/span> a<span class=\"token operator\">&#061;<\/span><span class=\"token number\">1<\/span> <span class=\"token operator\">and<\/span> b<span class=\"token operator\">&#061;<\/span><span class=\"token number\">2<\/span><br \/>\n<span class=\"token keyword\">where<\/span> a<span class=\"token operator\">&#061;<\/span><span class=\"token number\">1<\/span> <span class=\"token operator\">and<\/span> b<span class=\"token operator\">&#061;<\/span><span class=\"token number\">2<\/span> <span class=\"token operator\">and<\/span> c<span class=\"token operator\">&#061;<\/span><span class=\"token number\">3<\/span><br \/>\n<span class=\"token keyword\">where<\/span> b<span class=\"token operator\">&#061;<\/span><span class=\"token number\">2<\/span> <span class=\"token operator\">and<\/span> a<span class=\"token operator\">&#061;<\/span><span class=\"token number\">1<\/span> <span class=\"token comment\">&#8212; where \u6761\u4ef6\u987a\u5e8f\u6253\u4e71&#xff0c;\u4f18\u5316\u5668\u91cd\u6392&#xff0c;\u4f9d\u65e7\u547d\u4e2d\u7d22\u5f15<\/span><\/p>\n<p>\u274c \u65e0\u6cd5\u4f7f\u7528\u7d22\u5f15&#xff08;\u7f3a\u5931\u6700\u5de6\u524d\u7f00&#xff09;&#xff1a;<\/p>\n<p><span class=\"token keyword\">where<\/span> b<span class=\"token operator\">&#061;<\/span><span class=\"token number\">2<\/span><br \/>\n<span class=\"token keyword\">where<\/span> b<span class=\"token operator\">&#061;<\/span><span class=\"token number\">2<\/span> <span class=\"token operator\">and<\/span> c<span class=\"token operator\">&#061;<\/span><span class=\"token number\">3<\/span><br \/>\n<span class=\"token keyword\">where<\/span> c<span class=\"token operator\">&#061;<\/span><span class=\"token number\">5<\/span><\/p>\n<p>\u8bef\u533a&#xff1a;\u4e0d\u662f where \u5b50\u53e5\u5199\u4e86 a\/b\/c \u5b57\u6bb5\u5c31\u4e00\u5b9a\u80fd\u7528\u7d22\u5f15&#xff0c;\u5fc5\u987b\u8981\u6709\u7d22\u5f15\u5b9a\u4e49\u7684\u6700\u5de6\u8d77\u59cb\u5217\u3002<\/p>\n<h4>\u91cd\u70b9&#xff1a;\u9047\u5230\u8303\u56f4\u67e5\u8be2&#xff0c;\u540e\u9762\u5b57\u6bb5\u65e0\u6cd5\u505a\u7d22\u5f15 seek<\/h4>\n<p>&gt; &lt; &gt;&#061; &lt;&#061; between \u5c5e\u4e8e\u8303\u56f4\u6761\u4ef6\u3002\u4e00\u65e6\u590d\u5408\u7d22\u5f15\u5339\u914d\u4e2d\u9047\u5230\u8303\u56f4\u67e5\u8be2&#xff0c;\u8303\u56f4\u4e4b\u540e\u7684\u5b57\u6bb5\u4e0d\u80fd\u518d\u5229\u7528\u7d22\u5f15\u6709\u5e8f\u6027\u505a\u5feb\u901f\u5b9a\u4f4d&#xff08;seek&#xff09;\u3002<\/p>\n<p><span class=\"token keyword\">where<\/span> a<span class=\"token operator\">&#061;<\/span><span class=\"token number\">10<\/span> <span class=\"token operator\">and<\/span> b<span class=\"token operator\">&gt;<\/span><span class=\"token number\">20<\/span> <span class=\"token operator\">and<\/span> c<span class=\"token operator\">&#061;<\/span><span class=\"token number\">5<\/span><\/p>\n<ul>\n<li>a&#xff1a;\u7b49\u503c\u5339\u914d&#xff0c;\u7d22\u5f15 seek&#xff08;B&#043; \u6811\u4e8c\u5206\u5b9a\u4f4d&#xff09;<\/li>\n<li>b&#xff1a;\u8303\u56f4\u6761\u4ef6&#xff0c;\u7d22\u5f15 range \u626b\u63cf<\/li>\n<li>c&#xff1a;\u4e0d\u80fd\u8d70\u7d22\u5f15 seek\u3002\u56e0\u4e3a b \u8303\u56f4\u4e4b\u540e&#xff0c;c \u5728 B&#043; \u6811\u53f6\u5b50\u8282\u70b9\u5185\u90e8\u662f\u65e0\u5e8f\u7684<\/li>\n<\/ul>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/09\/20260906090928-6a9d2dc87f0a8.gif\" alt=\"\u8303\u56f4\u67e5\u8be2\u540e c \u65e0\u5e8f\" \/><\/p>\n<p>\u4e0a\u56fe\u5b8c\u6574\u6f14\u793a\u4e86 where a&#061;10 and b&gt;20 and c&#061;5 \u7684\u6267\u884c\u8fc7\u7a0b&#xff1a;a \u5148\u7b49\u503c seek \u5b9a\u4f4d&#xff1b;b \u8303\u56f4\u626b\u63cf\u547d\u4e2d\u8fde\u7eed 6 \u884c&#xff1b;\u4f46\u8fd9 6 \u884c\u91cc\u7684 c \u503c&#xff08;5,12,5,3,40,5&#xff09;\u5b8c\u5168\u65e0\u5e8f&#xff0c;\u65e0\u6cd5 seek \u5b9a\u4f4d&#xff0c;\u53ea\u80fd\u9010\u884c\u5224\u65ad\u3002<\/p>\n<p>\u4f46\u662f&#xff01;c \u4e0d\u662f\u5b8c\u5168\u5931\u6548&#xff0c;\u5b83\u53ef\u4ee5\u4ea4\u7ed9\u7d22\u5f15\u4e0b\u63a8 ICP \u5728\u4e8c\u7ea7\u7d22\u5f15\u9875\u5185\u8fc7\u6ee4&#xff0c;\u8fd9\u70b9\u662f\u5f88\u591a\u535a\u5ba2\u9057\u6f0f\u7684\u5173\u952e\u70b9\u3002<\/p>\n<h4>\u8865\u5145&#xff1a;in \u7b97\u4e0d\u7b97\u8303\u56f4&#xff1f;<\/h4>\n<p>in(1,2,3) \u4e0d\u5c5e\u4e8e\u7834\u574f\u7d22\u5f15\u7684\u8303\u56f4\u6761\u4ef6&#xff0c;MySQL \u5185\u90e8\u7b49\u4ef7\u591a\u4e2a or \u7b49\u503c&#xff0c;\u4e0d\u4f1a\u6253\u65ad\u540e\u9762\u7d22\u5f15\u5b57\u6bb5\u5339\u914d&#xff0c;\u540e\u7eed\u5b57\u6bb5\u4f9d\u65e7\u53ef\u4ee5 seek\u3002<\/p>\n<h4>\u8865\u5145&#xff1a;MySQL 8.0 \u7d22\u5f15\u8df3\u8dc3\u626b\u63cf&#xff08;Skip Scan&#xff09;<\/h4>\n<p>MySQL 8.0.13&#043; \u5f15\u5165 Skip Scan \u4f18\u5316\u3002\u5f53\u7f3a\u5931\u6700\u5de6\u524d\u7f00\u65f6&#xff08;\u5982 where b&#061;2 and c&#061;3&#xff09;&#xff0c;\u4f18\u5316\u5668\u53ef\u80fd\u901a\u8fc7\u626b\u63cf a \u7684\u6240\u6709\u4e0d\u540c\u503c&#xff0c;\u5728\u6bcf\u4e2a a \u503c\u4e0b\u5206\u522b\u505a b,c \u7684 seek \u6765\u5229\u7528\u7d22\u5f15&#xff0c;\u4ee3\u4ef7\u662f\u626b\u63cf\u6b21\u6570 &#061; a \u7684 distinct \u6570\u91cf\u3002Explain \u4e2d type&#061;range &#043; Using index for skip scan\u3002<\/p>\n<hr \/>\n<h3>\u4e8c\u3001\u7d22\u5f15\u4e0b\u63a8 ICP&#xff08;Index Condition Pushdown&#xff09;<\/h3>\n<p>ICP \u5168\u79f0&#xff1a;\u7d22\u5f15\u6761\u4ef6\u4e0b\u63a8&#xff0c;MySQL 5.6 \u4e4b\u540e\u652f\u6301&#xff0c;Explain Extra \u5b57\u6bb5\u663e\u793a Using index condition\u3002<\/p>\n<h4>\u6ca1\u6709 ICP \u65f6\u4ee3\u6267\u884c\u6d41\u7a0b<\/h4>\n<p>     BufferPool \/ \u78c1\u76d8<\/p>\n<p>     \u5b58\u50a8\u5f15\u64ce InnoDB<\/p>\n<p>     MySQL Server \u5c42<\/p>\n<p>      BufferPool \/ \u78c1\u76d8<\/p>\n<p>      \u5b58\u50a8\u5f15\u64ce InnoDB<\/p>\n<p>      MySQL Server \u5c42<\/p>\n<p>  #mermaid-svg-Zu1U4ObAzcPFy7j0{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:16px;fill:#333;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#mermaid-svg-Zu1U4ObAzcPFy7j0 .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#mermaid-svg-Zu1U4ObAzcPFy7j0 .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#mermaid-svg-Zu1U4ObAzcPFy7j0 .error-icon{fill:#552222;}#mermaid-svg-Zu1U4ObAzcPFy7j0 .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-Zu1U4ObAzcPFy7j0 .edge-thickness-normal{stroke-width:1px;}#mermaid-svg-Zu1U4ObAzcPFy7j0 .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-Zu1U4ObAzcPFy7j0 .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-Zu1U4ObAzcPFy7j0 .edge-thickness-invisible{stroke-width:0;fill:none;}#mermaid-svg-Zu1U4ObAzcPFy7j0 .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-Zu1U4ObAzcPFy7j0 .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-Zu1U4ObAzcPFy7j0 .marker{fill:#333333;stroke:#333333;}#mermaid-svg-Zu1U4ObAzcPFy7j0 .marker.cross{stroke:#333333;}#mermaid-svg-Zu1U4ObAzcPFy7j0 svg{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-Zu1U4ObAzcPFy7j0 p{margin:0;}#mermaid-svg-Zu1U4ObAzcPFy7j0 .actor{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:#ECECFF;}#mermaid-svg-Zu1U4ObAzcPFy7j0 text.actor&gt;tspan{fill:black;stroke:none;}#mermaid-svg-Zu1U4ObAzcPFy7j0 .actor-line{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);}#mermaid-svg-Zu1U4ObAzcPFy7j0 .innerArc{stroke-width:1.5;stroke-dasharray:none;}#mermaid-svg-Zu1U4ObAzcPFy7j0 .messageLine0{stroke-width:1.5;stroke-dasharray:none;stroke:#333;}#mermaid-svg-Zu1U4ObAzcPFy7j0 .messageLine1{stroke-width:1.5;stroke-dasharray:2,2;stroke:#333;}#mermaid-svg-Zu1U4ObAzcPFy7j0 #arrowhead path{fill:#333;stroke:#333;}#mermaid-svg-Zu1U4ObAzcPFy7j0 .sequenceNumber{fill:white;}#mermaid-svg-Zu1U4ObAzcPFy7j0 #sequencenumber{fill:#333;}#mermaid-svg-Zu1U4ObAzcPFy7j0 #crosshead path{fill:#333;stroke:#333;}#mermaid-svg-Zu1U4ObAzcPFy7j0 .messageText{fill:#333;stroke:none;}#mermaid-svg-Zu1U4ObAzcPFy7j0 .labelBox{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:#ECECFF;}#mermaid-svg-Zu1U4ObAzcPFy7j0 .labelText,#mermaid-svg-Zu1U4ObAzcPFy7j0 .labelText&gt;tspan{fill:black;stroke:none;}#mermaid-svg-Zu1U4ObAzcPFy7j0 .loopText,#mermaid-svg-Zu1U4ObAzcPFy7j0 .loopText&gt;tspan{fill:black;stroke:none;}#mermaid-svg-Zu1U4ObAzcPFy7j0 .loopLine{stroke-width:2px;stroke-dasharray:2,2;stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);}#mermaid-svg-Zu1U4ObAzcPFy7j0 .note{stroke:#aaaa33;fill:#fff5ad;}#mermaid-svg-Zu1U4ObAzcPFy7j0 .noteText,#mermaid-svg-Zu1U4ObAzcPFy7j0 .noteText&gt;tspan{fill:black;stroke:none;}#mermaid-svg-Zu1U4ObAzcPFy7j0 .activation0{fill:#f4f4f4;stroke:#666;}#mermaid-svg-Zu1U4ObAzcPFy7j0 .activation1{fill:#f4f4f4;stroke:#666;}#mermaid-svg-Zu1U4ObAzcPFy7j0 .activation2{fill:#f4f4f4;stroke:#666;}#mermaid-svg-Zu1U4ObAzcPFy7j0 .actorPopupMenu{position:absolute;}#mermaid-svg-Zu1U4ObAzcPFy7j0 .actorPopupMenuPanel{position:absolute;fill:#ECECFF;box-shadow:0px 8px 16px 0px rgba(0,0,0,0.2);filter:drop-shadow(3px 5px 2px rgb(0 0 0 \/ 0.4));}#mermaid-svg-Zu1U4ObAzcPFy7j0 .actor-man line{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:#ECECFF;}#mermaid-svg-Zu1U4ObAzcPFy7j0 .actor-man circle,#mermaid-svg-Zu1U4ObAzcPFy7j0 line{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:#ECECFF;stroke-width:2px;}#mermaid-svg-Zu1U4ObAzcPFy7j0 :root{&#8211;mermaid-font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;}<\/p>\n<p>   \u6839\u636e a\u3001b \u6761\u4ef6\u626b\u63cf\u4e8c\u7ea7\u7d22\u5f15&#xff0c;\u62ff\u5230\u4e3b\u952e id \u96c6\u5408<\/p>\n<p>   1<\/p>\n<p>   \u9010\u4e2a\u4e3b\u952e\u56de\u8868\u67e5\u805a\u7c07\u7d22\u5f15\u5b8c\u6574\u884c<\/p>\n<p>   2<\/p>\n<p>   \u8fd4\u56de\u6574\u884c\u6570\u636e<\/p>\n<p>   3<\/p>\n<p>   \u8fd4\u56de\u5168\u90e8\u884c\u6570\u636e<\/p>\n<p>   4<\/p>\n<p>   \u5728 Server \u5c42\u8fc7\u6ee4 c&#061;5 \u6761\u4ef6&#xff0c;\u4e22\u5f03\u4e0d\u6ee1\u8db3\u7684\u6570\u636e<\/p>\n<p>   5<\/p>\n<p>\u95ee\u9898&#xff1a;\u5f88\u591a\u4e3b\u952e\u5bf9\u5e94\u7684\u884c\u672c\u6765\u5c31\u4e0d\u6ee1\u8db3 c \u6761\u4ef6&#xff0c;\u767d\u767d\u6267\u884c\u5927\u91cf\u56de\u8868\u968f\u673a IO\u3002<\/p>\n<h4>\u5f00\u542f ICP \u540e\u6d41\u7a0b<\/h4>\n<p>     BufferPool \/ \u78c1\u76d8<\/p>\n<p>     \u5b58\u50a8\u5f15\u64ce InnoDB<\/p>\n<p>     MySQL Server \u5c42<\/p>\n<p>      BufferPool \/ \u78c1\u76d8<\/p>\n<p>      \u5b58\u50a8\u5f15\u64ce InnoDB<\/p>\n<p>      MySQL Server \u5c42<\/p>\n<p>  #mermaid-svg-wnKEUkPR2XmClVRy{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:16px;fill:#333;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#mermaid-svg-wnKEUkPR2XmClVRy .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#mermaid-svg-wnKEUkPR2XmClVRy .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#mermaid-svg-wnKEUkPR2XmClVRy .error-icon{fill:#552222;}#mermaid-svg-wnKEUkPR2XmClVRy .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-wnKEUkPR2XmClVRy .edge-thickness-normal{stroke-width:1px;}#mermaid-svg-wnKEUkPR2XmClVRy .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-wnKEUkPR2XmClVRy .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-wnKEUkPR2XmClVRy .edge-thickness-invisible{stroke-width:0;fill:none;}#mermaid-svg-wnKEUkPR2XmClVRy .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-wnKEUkPR2XmClVRy .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-wnKEUkPR2XmClVRy .marker{fill:#333333;stroke:#333333;}#mermaid-svg-wnKEUkPR2XmClVRy .marker.cross{stroke:#333333;}#mermaid-svg-wnKEUkPR2XmClVRy svg{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-wnKEUkPR2XmClVRy p{margin:0;}#mermaid-svg-wnKEUkPR2XmClVRy .actor{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:#ECECFF;}#mermaid-svg-wnKEUkPR2XmClVRy text.actor&gt;tspan{fill:black;stroke:none;}#mermaid-svg-wnKEUkPR2XmClVRy .actor-line{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);}#mermaid-svg-wnKEUkPR2XmClVRy .innerArc{stroke-width:1.5;stroke-dasharray:none;}#mermaid-svg-wnKEUkPR2XmClVRy .messageLine0{stroke-width:1.5;stroke-dasharray:none;stroke:#333;}#mermaid-svg-wnKEUkPR2XmClVRy .messageLine1{stroke-width:1.5;stroke-dasharray:2,2;stroke:#333;}#mermaid-svg-wnKEUkPR2XmClVRy #arrowhead path{fill:#333;stroke:#333;}#mermaid-svg-wnKEUkPR2XmClVRy .sequenceNumber{fill:white;}#mermaid-svg-wnKEUkPR2XmClVRy #sequencenumber{fill:#333;}#mermaid-svg-wnKEUkPR2XmClVRy #crosshead path{fill:#333;stroke:#333;}#mermaid-svg-wnKEUkPR2XmClVRy .messageText{fill:#333;stroke:none;}#mermaid-svg-wnKEUkPR2XmClVRy .labelBox{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:#ECECFF;}#mermaid-svg-wnKEUkPR2XmClVRy .labelText,#mermaid-svg-wnKEUkPR2XmClVRy .labelText&gt;tspan{fill:black;stroke:none;}#mermaid-svg-wnKEUkPR2XmClVRy .loopText,#mermaid-svg-wnKEUkPR2XmClVRy .loopText&gt;tspan{fill:black;stroke:none;}#mermaid-svg-wnKEUkPR2XmClVRy .loopLine{stroke-width:2px;stroke-dasharray:2,2;stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);}#mermaid-svg-wnKEUkPR2XmClVRy .note{stroke:#aaaa33;fill:#fff5ad;}#mermaid-svg-wnKEUkPR2XmClVRy .noteText,#mermaid-svg-wnKEUkPR2XmClVRy .noteText&gt;tspan{fill:black;stroke:none;}#mermaid-svg-wnKEUkPR2XmClVRy .activation0{fill:#f4f4f4;stroke:#666;}#mermaid-svg-wnKEUkPR2XmClVRy .activation1{fill:#f4f4f4;stroke:#666;}#mermaid-svg-wnKEUkPR2XmClVRy .activation2{fill:#f4f4f4;stroke:#666;}#mermaid-svg-wnKEUkPR2XmClVRy .actorPopupMenu{position:absolute;}#mermaid-svg-wnKEUkPR2XmClVRy .actorPopupMenuPanel{position:absolute;fill:#ECECFF;box-shadow:0px 8px 16px 0px rgba(0,0,0,0.2);filter:drop-shadow(3px 5px 2px rgb(0 0 0 \/ 0.4));}#mermaid-svg-wnKEUkPR2XmClVRy .actor-man line{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:#ECECFF;}#mermaid-svg-wnKEUkPR2XmClVRy .actor-man circle,#mermaid-svg-wnKEUkPR2XmClVRy line{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:#ECECFF;stroke-width:2px;}#mermaid-svg-wnKEUkPR2XmClVRy :root{&#8211;mermaid-font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;}<\/p>\n<p>   \u6839\u636e a seek&#xff0c;b \u505a range \u626b\u63cf<\/p>\n<p>   1<\/p>\n<p>   \u5728\u4e8c\u7ea7\u7d22\u5f15\u9875\u5185\u76f4\u63a5\u5229\u7528 c \u5217\u8fc7\u6ee4&#xff0c;\u4e0d\u6ee1\u8db3\u76f4\u63a5\u4e22\u5f03<\/p>\n<p>   2<\/p>\n<p>   \u53ea\u628a\u8fc7\u6ee4\u540e\u5269\u4f59\u7684\u4e3b\u952e id \u56de\u8868\u67e5\u6574\u884c<\/p>\n<p>   3<\/p>\n<p>   \u8fd4\u56de\u6574\u884c\u6570\u636e<\/p>\n<p>   4<\/p>\n<p>   \u8fd4\u56de\u8fc7\u6ee4\u540e\u7684\u884c<\/p>\n<p>   5<\/p>\n<p>\u2714 ICP \u672c\u8d28&#xff1a;\u5728\u4e8c\u7ea7\u7d22\u5f15\u9875\u8fc7\u6ee4\u6570\u636e&#xff0c;\u51cf\u5c11\u9700\u8981\u56de\u8868\u7684\u4e3b\u952e\u6570\u91cf&#xff0c;\u4ece\u800c\u51cf\u5c11\u56de\u8868 IO\u3002 \u26a0 \u6ce8\u610f&#xff1a;ICP \u53ea\u662f\u8fc7\u6ee4&#xff0c;\u4e0d\u80fd\u5bf9 c \u505a\u7d22\u5f15 seek&#xff0c;\u4e0d\u80fd\u5229\u7528 c \u7684\u6709\u5e8f\u6027\u5feb\u901f\u5b9a\u4f4d\u533a\u95f4\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/09\/20260906090928-6a9d2dc8a8b6c.gif\" alt=\"ICP \u6709\u65e0\u5bf9\u6bd4\" \/><\/p>\n<p>\u4e0a\u56fe\u5bf9\u6bd4\u4e86\u6709\u65e0 ICP \u7684\u6838\u5fc3\u5dee\u5f02&#xff1a;\u65e0 ICP \u65f6 6 \u884c\u5168\u90e8\u56de\u8868&#xff0c;\u5230 Server \u5c42\u624d\u53d1\u73b0 3 \u884c\u4e0d\u6ee1\u8db3 c&#061;5&#xff0c;\u56de\u8868\u767d\u505a&#xff1b;\u5f00\u542f ICP \u540e&#xff0c;\u5b58\u50a8\u5f15\u64ce\u5728\u7d22\u5f15\u9875\u5185\u5148\u8fc7\u6ee4 c&#061;5&#xff0c;\u53ea\u5269 3 \u6b21\u56de\u8868&#xff0c;\u968f\u673a IO \u76f4\u63a5\u51cf\u534a\u3002<\/p>\n<h4>\u8986\u76d6\u7d22\u5f15\u4e0e ICP \u533a\u5206<\/h4>\n<p>Explain Extra&#xff1a;<\/p>\n<ul>\n<li>Using index&#xff1a;\u8986\u76d6\u7d22\u5f15&#xff0c;\u76f4\u63a5\u4ece\u4e8c\u7ea7\u7d22\u5f15\u62ff\u5230\u5168\u90e8\u67e5\u8be2\u5b57\u6bb5&#xff0c;\u5b8c\u5168\u4e0d\u9700\u8981\u56de\u8868\u3002<\/li>\n<li>Using index condition&#xff1a;ICP&#xff0c;\u90e8\u5206\u6761\u4ef6\u7d22\u5f15\u5c42\u8fc7\u6ee4&#xff0c;\u4ecd\u7136\u9700\u8981\u56de\u8868\u3002<\/li>\n<\/ul>\n<hr \/>\n<h3>\u4e09\u3001\u56de\u8868\u662f\u4ec0\u4e48&#xff1f;\u805a\u7c07\u7d22\u5f15 vs \u4e8c\u7ea7\u7d22\u5f15<\/h3>\n<p>InnoDB \u4e2d&#xff1a;<\/p>\n<li>\u805a\u7c07\u7d22\u5f15&#xff08;\u4e3b\u952e\u7d22\u5f15&#xff09;&#xff1a;\u53f6\u5b50\u8282\u70b9\u5b58\u50a8\u5b8c\u6574\u6574\u884c\u6570\u636e&#xff1b;\u8868\u6570\u636e\u672c\u8eab\u5c31\u662f\u4e3b\u952e B&#043; \u6811\u3002<\/li>\n<li>\u4e8c\u7ea7\u7d22\u5f15&#xff08;\u666e\u901a\/\u590d\u5408\u7d22\u5f15&#xff09;&#xff1a;\u53f6\u5b50\u8282\u70b9\u5b58\u50a8\u7d22\u5f15\u5217 &#043; \u4e3b\u952e id&#xff0c;\u6ca1\u6709\u5b8c\u6574\u884c\u3002<\/li>\n<p>\u56de\u8868&#xff1a;\u62ff\u5230\u4e8c\u7ea7\u7d22\u5f15\u53f6\u5b50\u7684\u4e3b\u952e id&#xff0c;\u518d\u53bb\u4e3b\u952e B&#043; \u6811\u67e5\u627e\u5b8c\u6574\u884c\u6570\u636e\u7684\u8fc7\u7a0b\u3002<\/p>\n<p>\u5982\u679c\u67e5\u8be2\u9700\u8981\u7684\u5168\u90e8\u5b57\u6bb5\u90fd\u5728\u4e8c\u7ea7\u7d22\u5f15\u5185&#xff0c;\u4e0d\u9700\u8981\u8bfb\u53d6\u5b8c\u6574\u884c&#xff0c;\u5c31\u662f\u8986\u76d6\u7d22\u5f15&#xff0c;\u907f\u514d\u56de\u8868\u3002<\/p>\n<p><span class=\"token comment\">&#8212; \u8986\u76d6\u7d22\u5f15&#xff0c;Extra: Using index&#xff0c;\u65e0\u9700\u56de\u8868<\/span><br \/>\n<span class=\"token keyword\">select<\/span> a<span class=\"token punctuation\">,<\/span>b<span class=\"token punctuation\">,<\/span>c <span class=\"token keyword\">from<\/span> test <span class=\"token keyword\">where<\/span> a<span class=\"token operator\">&#061;<\/span><span class=\"token number\">10<\/span> <span class=\"token operator\">and<\/span> b<span class=\"token operator\">&gt;<\/span><span class=\"token number\">20<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<h4>key_len&#xff1a;\u5224\u65ad\u590d\u5408\u7d22\u5f15\u7528\u5230\u591a\u5c11\u5b57\u6bb5<\/h4>\n<p>key_len \u8868\u793a\u5b9e\u9645\u7528\u5230\u7d22\u5f15\u7684\u5b57\u8282\u957f\u5ea6\u3002\u4ee5 a INT, b INT, c INT \u4e3a\u4f8b&#xff1a;<\/p>\n<table>\n<tr>\u67e5\u8be2\u6761\u4ef6key_len\u542b\u4e49<\/tr>\n<tbody>\n<tr>\n<td>where a&#061;10<\/td>\n<td>5<\/td>\n<td>\u53ea\u7528 a&#xff08;INT 4 \u5b57\u8282 &#043; nullable 1 \u5b57\u8282&#xff09;<\/td>\n<\/tr>\n<tr>\n<td>where a&#061;10 and b&gt;20<\/td>\n<td>10<\/td>\n<td>\u7528\u5230 a\u3001b&#xff08;b \u8303\u56f4\u4ecd\u8ba1\u5165 key_len&#xff09;<\/td>\n<\/tr>\n<tr>\n<td>where a&#061;10 and b&#061;2 and c&#061;5<\/td>\n<td>15<\/td>\n<td>\u7528\u5230 a\u3001b\u3001c \u5168\u90e8<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u9762\u8bd5\u6280\u5de7&#xff1a;\u770b\u5230 key_len&#061;10 \u5c31\u77e5\u9053\u53ea\u7528\u5230\u524d\u4e24\u4e2a\u5b57\u6bb5&#xff1b;key_len&#061;5 \u8bf4\u660e\u53ea\u8d70\u4e86 a&#xff0c;b \u6ca1\u53c2\u4e0e\u7d22\u5f15\u5b9a\u4f4d\u3002<\/p>\n<hr \/>\n<h3>\u56db\u3001\u8868\u7a7a\u95f4\u4e0e\u6570\u636e\u9875\u7ec4\u7ec7&#xff1a;\u9875\u4ece\u54ea\u91cc\u6765&#xff1f;<\/h3>\n<p>\u5728\u8bb2 IO \u7c7b\u578b\u4e4b\u524d&#xff0c;\u5fc5\u987b\u5148\u56de\u7b54\u4e00\u4e2a\u95ee\u9898&#xff1a;\u56de\u8868\u65f6\u8bbf\u95ee\u7684&#034;\u9875&#034;&#xff0c;\u5728\u78c1\u76d8\u4e0a\u662f\u600e\u4e48\u5b58\u7684&#xff1f;<\/p>\n<p>InnoDB \u7684\u6570\u636e\u6700\u7ec8\u6301\u4e45\u5316\u5728\u8868\u7a7a\u95f4&#xff08;tablespace&#xff09;\u4e2d\u3002\u5f00\u542f innodb_file_per_table&#061;ON \u65f6&#xff0c;\u6bcf\u5f20\u8868\u5bf9\u5e94\u4e00\u4e2a\u72ec\u7acb\u7684 .ibd \u6587\u4ef6&#xff0c;\u8fd9\u5c31\u662f\u8be5\u8868\u7684\u72ec\u7acb\u8868\u7a7a\u95f4\u3002<\/p>\n<p>\u8868\u7a7a\u95f4\u5185\u90e8\u662f\u5c42\u7ea7\u7ec4\u7ec7&#xff1a;<\/p>\n<table>\n<tr>\u5c42\u7ea7\u5927\u5c0f\u4f5c\u7528<\/tr>\n<tbody>\n<tr>\n<td>\u9875&#xff08;Page&#xff09;<\/td>\n<td>16KB<\/td>\n<td>\u6700\u5c0f\u8bfb\u5199\u5355\u4f4d&#xff0c;\u5b58\u5b9e\u9645\u6570\u636e\u884c<\/td>\n<\/tr>\n<tr>\n<td>\u533a&#xff08;Extent&#xff09;<\/td>\n<td>1MB &#061; 64 \u9875<\/td>\n<td>\u7a7a\u95f4\u5206\u914d\u7684\u6700\u5c0f\u5355\u4f4d&#xff0c;\u4fdd\u8bc1\u533a\u5185\u9875\u7269\u7406\u8fde\u7eed<\/td>\n<\/tr>\n<tr>\n<td>\u6bb5&#xff08;Segment&#xff09;<\/td>\n<td>\u53d8\u957f<\/td>\n<td>\u903b\u8f91\u6982\u5ff5&#xff0c;\u5982\u53f6\u5b50\u8282\u70b9\u6bb5\u3001\u975e\u53f6\u5b50\u8282\u70b9\u6bb5<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u56e0\u679c\u94fe&#xff1a;<\/p>\n<p>\u56e0\u4e3a \u8868\u7a7a\u95f4\u6309 extent \u6210\u7247\u5206\u914d&#xff08;\u4e00\u6b21\u5206 64 \u9875&#xff0c;\u7269\u7406\u8fde\u7eed&#xff09;<br \/>\n  \u2192 \u6240\u4ee5 \u540c\u4e00\u6bb5\u65f6\u671f\u5185\u5206\u914d\u7684\u9875&#xff0c;\u7269\u7406\u4f4d\u7f6e\u5927\u6982\u7387\u76f8\u90bb<br \/>\n    \u2192 \u4f46\u56e0\u4e3a \u589e\u5220\u6539\u5bfc\u81f4\u9875\u5206\u88c2\u3001\u5408\u5e76\u3001\u56de\u6536\u518d\u5206\u914d<br \/>\n      \u2192 \u6240\u4ee5 \u903b\u8f91\u4e0a\u9875\u53f7\u76f8\u90bb\u7684\u4e24\u9875&#xff0c;\u78c1\u76d8\u4f4d\u7f6e\u53ef\u80fd\u5df2\u7ecf\u5206\u6563<br \/>\n        \u2192 \u56e0\u6b64 \u5224\u5b9a\u987a\u5e8f\/\u968f\u673a IO \u4e0d\u80fd\u770b\u7269\u7406\u4f4d\u7f6e&#xff0c;\u53ea\u80fd\u770b\u9875\u53f7\u8bbf\u95ee\u6b21\u5e8f<\/p>\n<p>\u5173\u952e\u8ba4\u77e5&#xff1a;B&#043; \u6811\u53f6\u5b50\u8282\u70b9\u7684&#034;\u903b\u8f91\u6709\u5e8f&#034;\u2260&#034;\u7269\u7406\u6709\u5e8f&#034;\u3002\u8868\u7a7a\u95f4\u51b3\u5b9a\u4e86\u9875\u7684\u7269\u7406\u843d\u811a\u5904&#xff0c;\u800c\u9875\u53f7\u53ea\u662f\u8868\u7a7a\u95f4\u5185\u7684\u903b\u8f91\u7f16\u53f7\u3002\u7406\u89e3\u8fd9\u4e00\u70b9&#xff0c;\u624d\u80fd\u771f\u6b63\u7406\u89e3\u4e0b\u4e00\u8282\u7684&#034;\u987a\u5e8f\/\u968f\u673a IO&#034;\u3002<\/p>\n<hr \/>\n<h3>\u4e94\u3001\u987a\u5e8f IO\u3001\u968f\u673a IO&#xff0c;\u4e0d\u8981\u518d\u8bb0\u6b7b\u53e3\u8bc0&#xff01;<\/h3>\n<p>\u7f51\u4e0a\u6d41\u4f20&#xff1a;\u4e8c\u7ea7\u7d22\u5f15\u626b\u63cf &#061; \u987a\u5e8f IO&#xff0c;\u56de\u8868 &#061; \u968f\u673a IO\u3002\u8fd9\u53e5\u8bdd\u53ea\u662f\u7edd\u5927\u591a\u6570\u573a\u666f\u7684\u7ecf\u9a8c\u603b\u7ed3&#xff0c;\u4e0d\u662f\u94c1\u5f8b\u5b9a\u4e49\u3002<\/p>\n<h4>InnoDB \u5224\u5b9a\u987a\u5e8f\/\u968f\u673a\u8bbf\u95ee\u6a21\u5f0f<\/h4>\n<p>InnoDB \u770b\u4e0d\u5230\u78c1\u76d8\u7269\u7406\u6247\u533a&#xff0c;\u770b\u7684\u662f\u8868\u7a7a\u95f4\u9875\u53f7\u7684\u8bbf\u95ee\u5e8f\u5217&#xff1a;<\/p>\n<li>\u987a\u5e8f\u8bbf\u95ee\u6a21\u5f0f&#xff08;\u987a\u5e8f IO&#xff09;&#xff1a;\u9875\u53f7\u6301\u7eed\u9012\u589e\u5411\u540e\u8bbf\u95ee&#xff1b;\u89e6\u53d1 InnoDB \u7ebf\u6027\u9884\u8bfb read-ahead\u3002\u54ea\u6015\u78c1\u76d8\u7269\u7406\u9875\u4e0d\u8fde\u7eed&#xff0c;\u53ea\u8981\u8bbf\u95ee\u6b21\u5e8f\u8fde\u7eed\u5411\u540e&#xff0c;\u5c31\u89c6\u4e3a\u987a\u5e8f\u8bbf\u95ee\u3002<\/li>\n<li>\u968f\u673a\u8bbf\u95ee\u6a21\u5f0f&#xff08;\u968f\u673a IO&#xff09;&#xff1a;\u9875\u53f7\u8df3\u8dc3\u65e0\u5e8f\u8bbf\u95ee&#xff0c;\u65e0\u6cd5\u89e6\u53d1\u9884\u8bfb&#xff0c;\u673a\u68b0\u78c1\u76d8\u4f1a\u4ea7\u751f\u6602\u8d35\u5bfb\u9053\u5f00\u9500\u3002<\/li>\n<p>\u5173\u952e\u70b9&#xff1a;\u987a\u5e8f IO\u3001\u968f\u673a IO \u662f\u8bbf\u95ee\u6a21\u5f0f&#xff0c;\u4e0d\u662f\u7d22\u5f15\u81ea\u5e26\u5c5e\u6027\u3002<\/p>\n<h5>\u793a\u4f8b 1&#xff1a;\u805a\u7c07\u7d22\u5f15&#xff08;\u4e3b\u952e&#xff09;<\/h5>\n<p><span class=\"token comment\">&#8212; \u4e3b\u952e\u8fde\u7eed\u8bfb\u53d6&#xff0c;\u9875\u53f7\u9012\u589e&#xff0c;\u987a\u5e8f IO<\/span><br \/>\n<span class=\"token keyword\">select<\/span> <span class=\"token operator\">*<\/span> <span class=\"token keyword\">from<\/span> test <span class=\"token keyword\">where<\/span> id <span class=\"token operator\">between<\/span> <span class=\"token number\">1000<\/span> <span class=\"token operator\">and<\/span> <span class=\"token number\">2000<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p><span class=\"token comment\">&#8212; \u4e3b\u952e\u4e71\u5e8f\u8df3\u8dc3\u8bfb\u53d6&#xff0c;\u9875\u53f7\u5230\u5904\u8df3&#xff0c;\u968f\u673a IO<\/span><br \/>\n<span class=\"token keyword\">select<\/span> <span class=\"token operator\">*<\/span> <span class=\"token keyword\">from<\/span> test <span class=\"token keyword\">where<\/span> id <span class=\"token operator\">in<\/span> <span class=\"token punctuation\">(<\/span><span class=\"token number\">1001<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token number\">7<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token number\">3900<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token number\">56<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p>\u666e\u901a\u56de\u8868\u4e3a\u4ec0\u4e48\u5927\u591a\u662f\u968f\u673a IO&#xff1a;<\/p>\n<p>\u4e8c\u7ea7\u7d22\u5f15\u7b5b\u9009\u51fa\u6765\u7684\u4e3b\u952e id \u96c6\u5408&#xff0c;\u6392\u5e8f\u89c4\u5219\u8ddf\u968f (a,b,c)&#xff0c;\u4e3b\u952e id \u662f\u4e71\u5e8f\u6253\u6563\u7684&#xff1b;\u62ff\u7740\u4e00\u5806\u65e0\u5e8f id \u8bbf\u95ee\u805a\u7c07\u7d22\u5f15&#xff0c;\u9875\u53f7\u6765\u56de\u8df3&#xff0c;\u4ea7\u751f\u968f\u673a IO\u3002<\/p>\n<h4>MRR \u4f18\u5316&#xff1a;\u628a\u56de\u8868\u968f\u673a IO \u8f6c\u4e3a\u987a\u5e8f IO<\/h4>\n<p>MRR&#xff08;Multi-Range Read&#xff09;\u591a\u8303\u56f4\u8bfb\u4f18\u5316&#xff0c;MySQL \u5b98\u65b9\u4e13\u95e8\u89e3\u51b3\u56de\u8868\u5927\u91cf\u968f\u673a IO \u7684\u65b9\u6848&#xff1a;<\/p>\n<li>\u5148\u4ece\u4e8c\u7ea7\u7d22\u5f15\u62ff\u5230\u4e00\u6279\u5f85\u56de\u8868\u4e3b\u952e id&#xff1b;<\/li>\n<li>\u5728\u5185\u5b58\u7f13\u51b2\u533a&#xff0c;\u628a\u4e3b\u952e id \u4ece\u5c0f\u5230\u5927\u6392\u5e8f&#xff1b;<\/li>\n<li>\u6309\u4e3b\u952e\u5347\u5e8f\u8bbf\u95ee\u805a\u7c07\u7d22\u5f15&#xff0c;\u9875\u53f7\u9012\u589e&#xff0c;\u968f\u673a IO \u53d8\u6210\u987a\u5e8f IO\u3002<\/li>\n<p>Explain \u4f1a\u770b\u5230 Extra&#xff1a;Using MRR\u3002MRR \u5145\u5206\u8bc1\u660e&#xff0c;\u56de\u8868\u672c\u8eab\u4e0d\u7b49\u4e8e\u968f\u673a IO&#xff0c;\u8bbf\u95ee\u4e3b\u952e\u7684\u6b21\u5e8f\u51b3\u5b9a IO \u7c7b\u578b\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/09\/20260906090928-6a9d2dc8d35b9.gif\" alt=\"MRR \u968f\u673a\u8f6c\u987a\u5e8f IO\" \/><\/p>\n<p>\u4e0a\u56fe\u6f14\u793a\u4e86 MRR \u7684\u6838\u5fc3\u673a\u5236&#xff1a;\u4e8c\u7ea7\u7d22\u5f15\u6309 (a,b,c) \u5e8f\u5410\u51fa\u4e3b\u952e 57,3,812,21,406&#xff08;\u4e71\u5e8f&#xff09;&#xff0c;\u76f4\u63a5\u56de\u8868\u65f6\u9875\u53f7\u6765\u56de\u8df3 &#061; \u968f\u673a IO&#xff1b;MRR \u5148\u5728\u7f13\u51b2\u533a\u6392\u6210\u5347\u5e8f 3,21,57,406,812&#xff0c;\u518d\u6309\u9875\u53f7\u9012\u589e\u987a\u5e8f\u8bbf\u95ee \u2192 \u987a\u5e8f IO &#043; \u89e6\u53d1\u9884\u8bfb\u3002<\/p>\n<h4>\u91cd\u8981\u7ed3\u8bba<\/h4>\n<p>\u5982\u679c\u9700\u8981\u8bbf\u95ee\u7684\u6570\u636e\u9875\u5168\u90e8\u547d\u4e2d Buffer Pool \u5185\u5b58&#xff0c;\u4e0d\u5b58\u5728\u78c1\u76d8 IO&#xff0c;\u987a\u5e8f IO\u3001\u968f\u673a IO \u6ca1\u6709\u6027\u80fd\u5dee\u5f02\u3002\u987a\u5e8f\/\u968f\u673a IO \u6982\u5ff5\u53ea\u9488\u5bf9\u78c1\u76d8\u8bbf\u95ee\u573a\u666f\u3002<\/p>\n<hr \/>\n<h3>\u516d\u3001\u5ef6\u4f38\u7406\u89e3&#xff1a;BufferPool\u3001\u810f\u9875&#xff0c;\u5e2e\u4f60\u770b\u61c2 SQL \u5e95\u5c42 IO \u884c\u4e3a<\/h3>\n<h4>1. BufferPool LRU \u51b7\u70ed\u5206\u533a<\/h4>\n<p>  #mermaid-svg-aPSAqH6ZIZs0Xbke{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:16px;fill:#333;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#mermaid-svg-aPSAqH6ZIZs0Xbke .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#mermaid-svg-aPSAqH6ZIZs0Xbke .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#mermaid-svg-aPSAqH6ZIZs0Xbke .error-icon{fill:#552222;}#mermaid-svg-aPSAqH6ZIZs0Xbke .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-aPSAqH6ZIZs0Xbke .edge-thickness-normal{stroke-width:1px;}#mermaid-svg-aPSAqH6ZIZs0Xbke .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-aPSAqH6ZIZs0Xbke .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-aPSAqH6ZIZs0Xbke .edge-thickness-invisible{stroke-width:0;fill:none;}#mermaid-svg-aPSAqH6ZIZs0Xbke .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-aPSAqH6ZIZs0Xbke .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-aPSAqH6ZIZs0Xbke .marker{fill:#333333;stroke:#333333;}#mermaid-svg-aPSAqH6ZIZs0Xbke .marker.cross{stroke:#333333;}#mermaid-svg-aPSAqH6ZIZs0Xbke svg{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-aPSAqH6ZIZs0Xbke p{margin:0;}#mermaid-svg-aPSAqH6ZIZs0Xbke .label{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;color:#333;}#mermaid-svg-aPSAqH6ZIZs0Xbke .cluster-label text{fill:#333;}#mermaid-svg-aPSAqH6ZIZs0Xbke .cluster-label span{color:#333;}#mermaid-svg-aPSAqH6ZIZs0Xbke .cluster-label span p{background-color:transparent;}#mermaid-svg-aPSAqH6ZIZs0Xbke .label text,#mermaid-svg-aPSAqH6ZIZs0Xbke span{fill:#333;color:#333;}#mermaid-svg-aPSAqH6ZIZs0Xbke .node rect,#mermaid-svg-aPSAqH6ZIZs0Xbke .node circle,#mermaid-svg-aPSAqH6ZIZs0Xbke .node ellipse,#mermaid-svg-aPSAqH6ZIZs0Xbke .node polygon,#mermaid-svg-aPSAqH6ZIZs0Xbke .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-svg-aPSAqH6ZIZs0Xbke .rough-node .label text,#mermaid-svg-aPSAqH6ZIZs0Xbke .node .label text,#mermaid-svg-aPSAqH6ZIZs0Xbke .image-shape .label,#mermaid-svg-aPSAqH6ZIZs0Xbke .icon-shape .label{text-anchor:middle;}#mermaid-svg-aPSAqH6ZIZs0Xbke .node .katex path{fill:#000;stroke:#000;stroke-width:1px;}#mermaid-svg-aPSAqH6ZIZs0Xbke .rough-node .label,#mermaid-svg-aPSAqH6ZIZs0Xbke .node .label,#mermaid-svg-aPSAqH6ZIZs0Xbke .image-shape .label,#mermaid-svg-aPSAqH6ZIZs0Xbke .icon-shape .label{text-align:center;}#mermaid-svg-aPSAqH6ZIZs0Xbke .node.clickable{cursor:pointer;}#mermaid-svg-aPSAqH6ZIZs0Xbke .root .anchor path{fill:#333333!important;stroke-width:0;stroke:#333333;}#mermaid-svg-aPSAqH6ZIZs0Xbke .arrowheadPath{fill:#333333;}#mermaid-svg-aPSAqH6ZIZs0Xbke .edgePath .path{stroke:#333333;stroke-width:2.0px;}#mermaid-svg-aPSAqH6ZIZs0Xbke .flowchart-link{stroke:#333333;fill:none;}#mermaid-svg-aPSAqH6ZIZs0Xbke .edgeLabel{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-aPSAqH6ZIZs0Xbke .edgeLabel p{background-color:rgba(232,232,232, 0.8);}#mermaid-svg-aPSAqH6ZIZs0Xbke .edgeLabel rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-aPSAqH6ZIZs0Xbke .labelBkg{background-color:rgba(232, 232, 232, 0.5);}#mermaid-svg-aPSAqH6ZIZs0Xbke .cluster rect{fill:#ffffde;stroke:#aaaa33;stroke-width:1px;}#mermaid-svg-aPSAqH6ZIZs0Xbke .cluster text{fill:#333;}#mermaid-svg-aPSAqH6ZIZs0Xbke .cluster span{color:#333;}#mermaid-svg-aPSAqH6ZIZs0Xbke div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:12px;background:hsl(80, 100%, 96.2745098039%);border:1px solid #aaaa33;border-radius:2px;pointer-events:none;z-index:100;}#mermaid-svg-aPSAqH6ZIZs0Xbke .flowchartTitleText{text-anchor:middle;font-size:18px;fill:#333;}#mermaid-svg-aPSAqH6ZIZs0Xbke rect.text{fill:none;stroke-width:0;}#mermaid-svg-aPSAqH6ZIZs0Xbke .icon-shape,#mermaid-svg-aPSAqH6ZIZs0Xbke .image-shape{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-aPSAqH6ZIZs0Xbke .icon-shape p,#mermaid-svg-aPSAqH6ZIZs0Xbke .image-shape p{background-color:rgba(232,232,232, 0.8);padding:2px;}#mermaid-svg-aPSAqH6ZIZs0Xbke .icon-shape .label rect,#mermaid-svg-aPSAqH6ZIZs0Xbke .image-shape .label rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-aPSAqH6ZIZs0Xbke .label-icon{display:inline-block;height:1em;overflow:visible;vertical-align:-0.125em;}#mermaid-svg-aPSAqH6ZIZs0Xbke .node .label-icon path{fill:currentColor;stroke:revert;stroke-width:revert;}#mermaid-svg-aPSAqH6ZIZs0Xbke :root{&#8211;mermaid-font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;}<\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>BufferPool<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"edgeLabel\"><\/span><\/p>\n<p>         <span class=\"edgeLabel\"><\/span><\/p>\n<p>         <span class=\"edgeLabel\"><\/p>\n<p>\u5426<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"edgeLabel\"><\/p>\n<p>\u662f<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"edgeLabel\"><\/span><\/p>\n<p>         <span class=\"edgeLabel\"><\/span><\/p>\n<p>         <span class=\"edgeLabel\"><\/span><\/p>\n<p>         <span class=\"edgeLabel\"><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>young \u70ed\u533a&#xff08;\u6700\u8fd1\u9891\u7e41\u8bbf\u95ee&#xff09;<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>old \u51b7\u533a&#xff08;\u65b0\u9875\u9ed8\u8ba4\u8fdb\u6765&#xff09;<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>\u65b0\u9875\u52a0\u8f7d<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>1s \u5185\u518d\u6b21\u8bbf\u95ee&#xff1f;<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>\u505c\u7559 &gt;1s \u518d\u8bbf\u95ee<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>\u6dd8\u6c70\u51b7\u9875<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>\u6dd8\u6c70\u70ed\u9875<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>\u5168\u8868\u626b\u63cf\u5927\u91cf\u65b0\u9875<\/p>\n<p><\/span><\/p>\n<p>InnoDB \u4f7f\u7528\u6539\u826f LRU \u94fe\u8868&#xff0c;\u5206\u4e3a young \u70ed\u533a\u3001old \u51b7\u533a\u3002\u65b0\u9875\u9ed8\u8ba4\u8fdb\u5165 old \u533a\u5934\u90e8&#xff1b;\u53ea\u6709\u5728 old \u533a\u505c\u7559\u8d85\u8fc7 innodb_old_blocks_time&#xff08;\u9ed8\u8ba4 1000ms&#xff09;\u540e\u518d\u6b21\u88ab\u8bbf\u95ee&#xff0c;\u624d\u4f1a\u79fb\u5230 young \u533a\u5934\u90e8\u3002\u8fd9\u907f\u514d\u4e86\u5168\u8868\u626b\u63cf\u4e00\u6b21\u6027\u51b2\u6389\u5168\u90e8\u70ed\u70b9\u7f13\u5b58\u3002<\/p>\n<h4>2. \u810f\u9875\u751f\u547d\u5468\u671f<\/h4>\n<p>  #mermaid-svg-vJbTcqFybr50Rk5b{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:16px;fill:#333;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#mermaid-svg-vJbTcqFybr50Rk5b .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#mermaid-svg-vJbTcqFybr50Rk5b .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#mermaid-svg-vJbTcqFybr50Rk5b .error-icon{fill:#552222;}#mermaid-svg-vJbTcqFybr50Rk5b .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-vJbTcqFybr50Rk5b .edge-thickness-normal{stroke-width:1px;}#mermaid-svg-vJbTcqFybr50Rk5b .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-vJbTcqFybr50Rk5b .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-vJbTcqFybr50Rk5b .edge-thickness-invisible{stroke-width:0;fill:none;}#mermaid-svg-vJbTcqFybr50Rk5b .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-vJbTcqFybr50Rk5b .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-vJbTcqFybr50Rk5b .marker{fill:#333333;stroke:#333333;}#mermaid-svg-vJbTcqFybr50Rk5b .marker.cross{stroke:#333333;}#mermaid-svg-vJbTcqFybr50Rk5b svg{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-vJbTcqFybr50Rk5b p{margin:0;}#mermaid-svg-vJbTcqFybr50Rk5b defs #statediagram-barbEnd{fill:#333333;stroke:#333333;}#mermaid-svg-vJbTcqFybr50Rk5b g.stateGroup text{fill:#9370DB;stroke:none;font-size:10px;}#mermaid-svg-vJbTcqFybr50Rk5b g.stateGroup text{fill:#333;stroke:none;font-size:10px;}#mermaid-svg-vJbTcqFybr50Rk5b g.stateGroup .state-title{font-weight:bolder;fill:#131300;}#mermaid-svg-vJbTcqFybr50Rk5b g.stateGroup rect{fill:#ECECFF;stroke:#9370DB;}#mermaid-svg-vJbTcqFybr50Rk5b g.stateGroup line{stroke:#333333;stroke-width:1;}#mermaid-svg-vJbTcqFybr50Rk5b .transition{stroke:#333333;stroke-width:1;fill:none;}#mermaid-svg-vJbTcqFybr50Rk5b .stateGroup .composit{fill:white;border-bottom:1px;}#mermaid-svg-vJbTcqFybr50Rk5b .stateGroup .alt-composit{fill:#e0e0e0;border-bottom:1px;}#mermaid-svg-vJbTcqFybr50Rk5b .state-note{stroke:#aaaa33;fill:#fff5ad;}#mermaid-svg-vJbTcqFybr50Rk5b .state-note text{fill:black;stroke:none;font-size:10px;}#mermaid-svg-vJbTcqFybr50Rk5b .stateLabel .box{stroke:none;stroke-width:0;fill:#ECECFF;opacity:0.5;}#mermaid-svg-vJbTcqFybr50Rk5b .edgeLabel .label rect{fill:#ECECFF;opacity:0.5;}#mermaid-svg-vJbTcqFybr50Rk5b .edgeLabel{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-vJbTcqFybr50Rk5b .edgeLabel p{background-color:rgba(232,232,232, 0.8);}#mermaid-svg-vJbTcqFybr50Rk5b .edgeLabel rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-vJbTcqFybr50Rk5b .edgeLabel .label text{fill:#333;}#mermaid-svg-vJbTcqFybr50Rk5b .label div .edgeLabel{color:#333;}#mermaid-svg-vJbTcqFybr50Rk5b .stateLabel text{fill:#131300;font-size:10px;font-weight:bold;}#mermaid-svg-vJbTcqFybr50Rk5b .node circle.state-start{fill:#333333;stroke:#333333;}#mermaid-svg-vJbTcqFybr50Rk5b .node .fork-join{fill:#333333;stroke:#333333;}#mermaid-svg-vJbTcqFybr50Rk5b .node circle.state-end{fill:#9370DB;stroke:white;stroke-width:1.5;}#mermaid-svg-vJbTcqFybr50Rk5b .end-state-inner{fill:white;stroke-width:1.5;}#mermaid-svg-vJbTcqFybr50Rk5b .node rect{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-svg-vJbTcqFybr50Rk5b .node polygon{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-svg-vJbTcqFybr50Rk5b #statediagram-barbEnd{fill:#333333;}#mermaid-svg-vJbTcqFybr50Rk5b .statediagram-cluster rect{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-svg-vJbTcqFybr50Rk5b .cluster-label,#mermaid-svg-vJbTcqFybr50Rk5b .nodeLabel{color:#131300;}#mermaid-svg-vJbTcqFybr50Rk5b .statediagram-cluster rect.outer{rx:5px;ry:5px;}#mermaid-svg-vJbTcqFybr50Rk5b .statediagram-state .divider{stroke:#9370DB;}#mermaid-svg-vJbTcqFybr50Rk5b .statediagram-state .title-state{rx:5px;ry:5px;}#mermaid-svg-vJbTcqFybr50Rk5b .statediagram-cluster.statediagram-cluster .inner{fill:white;}#mermaid-svg-vJbTcqFybr50Rk5b .statediagram-cluster.statediagram-cluster-alt .inner{fill:#f0f0f0;}#mermaid-svg-vJbTcqFybr50Rk5b .statediagram-cluster .inner{rx:0;ry:0;}#mermaid-svg-vJbTcqFybr50Rk5b .statediagram-state rect.basic{rx:5px;ry:5px;}#mermaid-svg-vJbTcqFybr50Rk5b .statediagram-state rect.divider{stroke-dasharray:10,10;fill:#f0f0f0;}#mermaid-svg-vJbTcqFybr50Rk5b .note-edge{stroke-dasharray:5;}#mermaid-svg-vJbTcqFybr50Rk5b .statediagram-note rect{fill:#fff5ad;stroke:#aaaa33;stroke-width:1px;rx:0;ry:0;}#mermaid-svg-vJbTcqFybr50Rk5b .statediagram-note rect{fill:#fff5ad;stroke:#aaaa33;stroke-width:1px;rx:0;ry:0;}#mermaid-svg-vJbTcqFybr50Rk5b .statediagram-note text{fill:black;}#mermaid-svg-vJbTcqFybr50Rk5b .statediagram-note .nodeLabel{color:black;}#mermaid-svg-vJbTcqFybr50Rk5b .statediagram .edgeLabel{color:red;}#mermaid-svg-vJbTcqFybr50Rk5b #dependencyStart,#mermaid-svg-vJbTcqFybr50Rk5b #dependencyEnd{fill:#333333;stroke:#333333;stroke-width:1;}#mermaid-svg-vJbTcqFybr50Rk5b .statediagramTitleText{text-anchor:middle;font-size:18px;fill:#333;}#mermaid-svg-vJbTcqFybr50Rk5b :root{&#8211;mermaid-font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;}<\/p>\n<p>         <span class=\"edgeLabel\"><\/p>\n<p>\u4ece\u78c1\u76d8\u52a0\u8f7d\u5230 BufferPool<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"edgeLabel\"><\/p>\n<p>UPDATE\/INSERT\/DELETE \u4fee\u6539\u6570\u636e<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"edgeLabel\"><\/p>\n<p>Page Cleaner \u5f02\u6b65\u5237\u810f\u6210\u529f<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"edgeLabel\"><\/p>\n<p>LRU \u6dd8\u6c70&#xff0c;\u76f4\u63a5\u4e22\u5f03<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"edgeLabel\"><\/p>\n<p>LRU \u6dd8\u6c70&#xff0c;\u5148\u5237\u810f\u518d\u91ca\u653e<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>\u5e72\u51c0\u9875<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>\u810f\u9875<\/p>\n<p><\/span><\/p>\n<h4>3. \u810f\u9875\u662f\u5426\u53ef\u8bfb&#xff1f;<\/h4>\n<p>\u810f\u9875\u5b8c\u5168\u53ef\u4ee5\u5bf9\u5916\u67e5\u8be2\u3002<\/p>\n<p>\u810f\u9875\u5b9a\u4e49&#xff1a;Buffer Pool \u5185\u5b58\u9875\u88ab\u4fee\u6539&#xff0c;\u5185\u5b58\u7248\u672c &gt; \u78c1\u76d8\u6301\u4e45\u5316\u7248\u672c&#xff1b;\u78c1\u76d8\u5b58\u65e7\u6570\u636e\u3002<\/p>\n<p>\u67e5\u8be2\u4f18\u5148\u8bfb\u53d6 Buffer Pool \u5185\u5b58\u4e2d\u7684\u9875&#xff0c;\u4e0d\u7ba1\u5b83\u662f\u4e0d\u662f\u810f\u9875&#xff1b;\u540e\u53f0 Page Cleaner \u7ebf\u7a0b\u5f02\u6b65\u5237\u810f\u9875&#xff0c;\u5237\u810f\u4e0d\u4f1a\u963b\u585e\u8bfb\u5199&#xff0c;\u5237\u76d8\u6210\u529f\u810f\u9875\u53d8\u6210\u5e72\u51c0\u9875&#xff0c;\u8be5\u9875\u4f9d\u65e7\u7559\u5728 BufferPool\u3002<\/p>\n<h4>4. \u810f\u9875\u5237\u76d8\u6210\u529f\u540e&#xff0c;\u4e3a\u4ec0\u4e48\u4e0d\u76f4\u63a5\u5220\u9664&#xff0c;\u8981\u7528 LRU \u6dd8\u6c70&#xff1f;<\/h4>\n<p>\u5f88\u591a\u4eba\u8bef\u533a&#xff1a;\u810f\u9875\u843d\u76d8\u5b8c\u6bd5\u5c31\u6ca1\u7528\u4e86&#xff0c;\u76f4\u63a5\u6e05\u6389\u3002<\/p>\n<li>Redo Log \u53ea\u8d1f\u8d23\u5d29\u6e83\u6062\u590d&#xff0c;\u4e1a\u52a1\u8fd0\u884c\u65f6 select \u4e0d\u4f1a\u8bfb\u53d6 redo log \u62ff\u4e1a\u52a1\u6570\u636e&#xff0c;redo log \u53ea\u662f\u64cd\u4f5c\u6d41\u6c34&#xff0c;\u6ca1\u6709\u5b8c\u6574\u6570\u636e\u9875\u7ed3\u6784\u3002<\/li>\n<li>BufferPool \u662f\u7f13\u5b58&#xff0c;\u9075\u5faa\u5c40\u90e8\u6027\u539f\u7406&#xff1a;\u521a\u8bbf\u95ee\u8fc7\u7684\u9875\u5927\u6982\u7387\u8fd8\u4f1a\u518d\u6b21\u8bbf\u95ee\u3002\u5237\u810f\u5b8c\u6210\u53d8\u6210\u5e72\u51c0\u9875&#xff0c;\u4ecd\u7136\u662f\u70ed\u70b9\u6570\u636e&#xff0c;\u7559\u5728\u5185\u5b58\u53ef\u4ee5\u907f\u514d\u91cd\u590d\u4ece\u78c1\u76d8\u52a0\u8f7d\u3002<\/li>\n<li>LRU \u6dd8\u6c70\u89e6\u53d1\u65f6\u673a&#xff1a;BufferPool \u5185\u5b58\u7528\u5c3d&#xff0c;\u8981\u52a0\u8f7d\u65b0\u7684\u6570\u636e\u9875\u65f6&#xff0c;\u624d\u6dd8\u6c70\u6700\u4e45\u672a\u8bbf\u95ee\u7684\u51b7\u9875\u3002\n<ul>\n<li>\u6dd8\u6c70\u810f\u9875&#xff1a;\u5148\u5237\u810f\u9875\u843d\u76d8&#xff0c;\u518d\u91ca\u653e\u5185\u5b58&#xff1b;<\/li>\n<li>\u6dd8\u6c70\u5e72\u51c0\u9875&#xff1a;\u76f4\u63a5\u4e22\u5f03&#xff0c;\u78c1\u76d8\u5df2\u6709\u526f\u672c\u3002<\/li>\n<\/ul>\n<\/li>\n<hr \/>\n<h3>\u4e03\u3001Explain \u5173\u952e\u5b57\u6bb5\u56de\u987e&#xff08;\u505a\u7d22\u5f15\u5206\u6790\u5fc5\u770b&#xff09;<\/h3>\n<table>\n<tr>\u5b57\u6bb5\u542b\u4e49\u9762\u8bd5\u5173\u6ce8\u70b9<\/tr>\n<tbody>\n<tr>\n<td>type<\/td>\n<td>\u8bbf\u95ee\u7c7b\u578b<\/td>\n<td>ref&#061;\u7b49\u503c\u7d22\u5f15\u67e5\u627e&#xff1b;range&#061;\u8303\u56f4\u7d22\u5f15\u626b\u63cf&#xff1b;ALL&#061;\u5168\u8868\u626b\u63cf<\/td>\n<\/tr>\n<tr>\n<td>key<\/td>\n<td>\u5b9e\u9645\u4f7f\u7528\u7d22\u5f15<\/td>\n<td>\u786e\u8ba4\u662f\u5426\u8d70\u4e86\u9884\u671f\u7d22\u5f15<\/td>\n<\/tr>\n<tr>\n<td>key_len<\/td>\n<td>\u5b9e\u9645\u7528\u5230\u7d22\u5f15\u5b57\u8282\u957f\u5ea6<\/td>\n<td>\u5224\u65ad\u590d\u5408\u7d22\u5f15\u7528\u5230\u591a\u5c11\u5b57\u6bb5&#xff08;INT nullable &#061; 5 \u5b57\u8282&#xff09;<\/td>\n<\/tr>\n<tr>\n<td>Extra<\/td>\n<td>\u989d\u5916\u4fe1\u606f<\/td>\n<td>Using index&#061;\u8986\u76d6\u7d22\u5f15\u65e0\u56de\u8868&#xff1b;Using index condition&#061;ICP&#xff1b;Using MRR&#061;\u591a\u8303\u56f4\u8bfb\u4f18\u5316&#xff1b;Using filesort&#061;\u9700\u989d\u5916\u6392\u5e8f<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<hr \/>\n<h3>\u516b\u3001\u9ad8\u9891\u8e29\u5751\u603b\u7ed3&#xff08;\u9762\u8bd5\u901f\u8bb0&#xff09;<\/h3>\n<li>\u6700\u5de6\u5339\u914d\u8981\u6c42\u7d22\u5f15\u5b9a\u4e49\u7684\u8fde\u7eed\u6700\u5de6\u524d\u7f00&#xff0c;where \u6761\u4ef6\u4e66\u5199\u987a\u5e8f\u65e0\u5173&#xff0c;\u4f18\u5316\u5668\u81ea\u52a8\u8c03\u6574\u3002<\/li>\n<li>\u9047\u5230 &gt; &lt; between \u8303\u56f4\u67e5\u8be2&#xff0c;\u540e\u9762\u5b57\u6bb5\u4e0d\u80fd\u7d22\u5f15 seek&#xff0c;\u4f46\u53ef\u88ab ICP \u8fc7\u6ee4&#xff1b;in \u4e0d\u4f1a\u6253\u65ad\u7d22\u5f15\u5339\u914d\u3002<\/li>\n<li>ICP \u51cf\u5c11\u56de\u8868\u6570\u91cf&#xff0c;\u4f46\u4e0d\u80fd\u66ff\u4ee3\u7d22\u5f15 seek&#xff1b;\u8986\u76d6\u7d22\u5f15\u76f4\u63a5\u6d88\u9664\u56de\u8868\u3002<\/li>\n<li>\u987a\u5e8f IO \/ \u968f\u673a IO \u770b\u9875\u9762\u8bbf\u95ee\u6b21\u5e8f&#xff0c;\u4e0d\u662f\u7d22\u5f15\u7c7b\u578b&#xff1b;MRR \u53ef\u4ee5\u628a\u56de\u8868\u968f\u673a IO \u8f6c\u4e3a\u987a\u5e8f IO\u3002<\/li>\n<li>\u5168\u90e8\u9875\u547d\u4e2d BufferPool&#xff0c;\u78c1\u76d8 IO \u6d88\u5931&#xff0c;\u987a\u5e8f\u968f\u673a IO \u6027\u80fd\u65e0\u5dee\u522b\u3002<\/li>\n<li>\u810f\u9875\u53ef\u8bfb&#xff0c;\u5237\u810f\u4e0d\u7b49\u4e8e\u9a71\u9010\u9875\u9762&#xff1b;LRU \u53ea\u6709\u5185\u5b58\u4e0d\u8db3\u624d\u6dd8\u6c70\u51b7\u9875&#xff1b;redo log \u53ea\u7ba1\u5d29\u6e83\u6062\u590d&#xff0c;\u4e1a\u52a1\u67e5\u8be2\u4e0d\u4f1a\u8bfb\u53d6 redo log\u3002<\/li>\n<li>\u590d\u5408\u7d22\u5f15\u8bbe\u8ba1\u539f\u5219&#xff1a;\u7b49\u503c\u6761\u4ef6\u653e\u524d\u9762&#xff0c;\u8303\u56f4\u6761\u4ef6\u5c3d\u91cf\u653e\u5728\u7d22\u5f15\u6700\u540e\u3002<\/li>\n<hr \/>\n<h3>\u4e5d\u3001\u56e0\u679c\u94fe\u603b\u6536\u675f&#xff1a;\u4e00\u6761\u94fe\u4e32\u8d77\u6240\u6709\u6982\u5ff5<\/h3>\n<p>\u56e0\u4e3a \u590d\u5408\u7d22\u5f15\u53f6\u5b50\u6309 (a,b,c) \u5168\u5c40\u6709\u5e8f<br \/>\n  \u2192 \u6240\u4ee5 \u67e5\u8be2\u53ef\u4ee5\u4ece a \u5f00\u59cb\u4e8c\u5206 seek<br \/>\n    \u2192 \u56e0\u4e3a \u6392\u5e8f\u4f18\u5148\u7ea7 a\u2192b\u2192c \u4f9d\u6b21\u9012\u51cf<br \/>\n      \u2192 \u6240\u4ee5 b \u8303\u56f4\u540e c \u5728\u53f6\u5b50\u5185\u90e8\u65e0\u5e8f<br \/>\n        \u2192 \u56e0\u4e3a c \u65e0\u5e8f\u65e0\u6cd5 seek&#xff0c;\u53ea\u80fd\u9010\u884c\u5224\u65ad<br \/>\n          \u2192 \u6240\u4ee5 \u5f15\u5165 ICP \u5728\u5f15\u64ce\u5c42\u8fc7\u6ee4&#xff0c;\u51cf\u5c11\u56de\u8868<br \/>\n            \u2192 \u56e0\u4e3a \u4e8c\u7ea7\u7d22\u5f15\u5410\u51fa\u4e3b\u952e id \u8ddf\u968f (a,b,c) \u6392\u5e8f&#xff0c;\u4e3b\u952e\u4e71\u5e8f<br \/>\n              \u2192 \u6240\u4ee5 \u56de\u8868\u9700\u8981\u8bbf\u95ee\u805a\u7c07\u7d22\u5f15\u9875<br \/>\n                \u2192 \u56e0\u4e3a \u805a\u7c07\u7d22\u5f15\u9875\u5b58\u50a8\u5728\u8868\u7a7a\u95f4\u4e2d&#xff0c;\u9875\u53f7\u7531\u8868\u7a7a\u95f4\u5206\u914d<br \/>\n                  \u2192 \u6240\u4ee5 \u56de\u8868\u9ed8\u8ba4\u662f\u968f\u673a IO&#xff08;\u9875\u53f7\u8df3\u8dc3&#xff09;<br \/>\n                    \u2192 \u56e0\u4e3a MRR \u628a\u4e3b\u952e\u6392\u5e8f\u540e\u518d\u8bbf\u95ee<br \/>\n                      \u2192 \u6240\u4ee5 \u56de\u8868\u53d8\u6210\u987a\u5e8f IO &#043; \u89e6\u53d1\u9884\u8bfb<br \/>\n                        \u2192 \u56e0\u4e3a \u9875\u5168\u90e8\u547d\u4e2d BufferPool \u65f6\u4e0d\u5b58\u5728\u78c1\u76d8 IO<br \/>\n                          \u2192 \u6240\u4ee5 \u987a\u5e8f\/\u968f\u673a IO \u6982\u5ff5\u53ea\u5728\u78c1\u76d8\u5c42\u6709\u610f\u4e49<\/p>\n<p>\u8fd9\u6761\u94fe\u4e0a\u7684\u6bcf\u4e00\u4e2a\u73af\u8282&#xff0c;\u90fd\u662f\u524d\u4e00\u4e2a\u73af\u8282\u7684\u5fc5\u7136\u63a8\u8bba\u3002\u62ff\u6389\u4efb\u4f55\u4e00\u8282&#xff0c;\u540e\u9762\u7684\u7ed3\u8bba\u90fd\u4e0d\u6210\u7acb\u3002<\/p>\n<hr \/>\n<h3>\u53c2\u8003\u8d44\u6599<\/h3>\n<ul>\n<li>\u300a\u9ad8\u6027\u80fd MySQL\u300b\u7b2c 5 \u7ae0 \u2014 \u7d22\u5f15\u8bbe\u8ba1<\/li>\n<li>MySQL \u5b98\u65b9\u6587\u6863 \u2014 Index Condition Pushdown<\/li>\n<li>MySQL \u5b98\u65b9\u6587\u6863 \u2014 Multi-Range Read Optimization<\/li>\n<li>MySQL \u5b98\u65b9\u6587\u6863 \u2014 InnoDB Buffer Pool<\/li>\n<li>MySQL \u5b98\u65b9\u6587\u6863 \u2014 InnoDB Read-Ahead<\/li>\n<li>MySQL \u7d22\u5f15\u4e0b\u63a8 ICP \u8be6\u89e3 \u2014 \u535a\u5ba2\u56ed<\/li>\n<li>MySQL MRR \u4f18\u5316\u8be6\u89e3 \u2014 \u535a\u5ba2\u56ed<\/li>\n<li>InnoDB Buffer Pool LRU \u51b7\u70ed\u5206\u533a \u2014 CSDN<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>\u6458\u8981&#xff1a;\u7f51\u4e0a\u5927\u91cf\u6559\u7a0b\u53ea\u8bb2\u6700\u5de6\u5339\u914d\u53e3\u8bc0&#xff0c;\u5f88\u5c11\u8bb2\u5e95\u5c42 B \u6811\u3001\u7d22\u5f15\u4e0b\u63a8 ICP\u3001\u56de\u8868\u3001\u987a\u5e8f\/\u968f\u673a IO\u3001BufferPool \u4e4b\u95f4\u7684\u5b8c\u6574\u94fe\u8def\u3002\u672c\u6587\u7ed3\u5408 Explain \u6267\u884c\u8ba1\u5212\u3001\u5e95\u5c42\u5b58\u50a8\u539f\u7406&#xff0c;\u628a\u9762\u8bd5\u9ad8\u9891\u5751\u4e00\u6b21\u6027\u8bb2\u900f\u3002 \u524d\u7f6e\u51c6\u5907<br \/>\n\u5efa\u8868\u4e0e\u590d\u5408\u7d22\u5f15&#xff1a;<br \/>\nCREATE TABLE test(id INT PRIMARY KEY AUTO_INCREMENT,a INT,b INT,c INT<br \/>\n);<br \/>\n&#8212; \u521b\u5efa\u8054\u5408\u7d22\u5f15 idx(a,b<\/p>\n","protected":false},"author":2,"featured_media":101331,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[114,100],"topic":[],"class_list":["post-101335","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-mysql","tag-100"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>MySQL \u590d\u5408\u7d22\u5f15\u6df1\u5ea6\u5256\u6790\uff1a\u6700\u5de6\u5339\u914d\u3001ICP\u3001\u56de\u8868\u3001IO \u6a21\u5f0f\u5e95\u5c42\u771f\u76f8 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/101335.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"MySQL \u590d\u5408\u7d22\u5f15\u6df1\u5ea6\u5256\u6790\uff1a\u6700\u5de6\u5339\u914d\u3001ICP\u3001\u56de\u8868\u3001IO \u6a21\u5f0f\u5e95\u5c42\u771f\u76f8 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6458\u8981&#xff1a;\u7f51\u4e0a\u5927\u91cf\u6559\u7a0b\u53ea\u8bb2\u6700\u5de6\u5339\u914d\u53e3\u8bc0&#xff0c;\u5f88\u5c11\u8bb2\u5e95\u5c42 B \u6811\u3001\u7d22\u5f15\u4e0b\u63a8 ICP\u3001\u56de\u8868\u3001\u987a\u5e8f\/\u968f\u673a IO\u3001BufferPool \u4e4b\u95f4\u7684\u5b8c\u6574\u94fe\u8def\u3002\u672c\u6587\u7ed3\u5408 Explain \u6267\u884c\u8ba1\u5212\u3001\u5e95\u5c42\u5b58\u50a8\u539f\u7406&#xff0c;\u628a\u9762\u8bd5\u9ad8\u9891\u5751\u4e00\u6b21\u6027\u8bb2\u900f\u3002 \u524d\u7f6e\u51c6\u5907 \u5efa\u8868\u4e0e\u590d\u5408\u7d22\u5f15&#xff1a; CREATE TABLE test(id INT PRIMARY KEY AUTO_INCREMENT,a INT,b INT,c INT ); -- \u521b\u5efa\u8054\u5408\u7d22\u5f15 idx(a,b\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/101335.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-09-06T09:09:30+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/09\/20260906090928-6a9d2dc8362ad.gif\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"14 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/101335.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/101335.html\",\"name\":\"MySQL \u590d\u5408\u7d22\u5f15\u6df1\u5ea6\u5256\u6790\uff1a\u6700\u5de6\u5339\u914d\u3001ICP\u3001\u56de\u8868\u3001IO \u6a21\u5f0f\u5e95\u5c42\u771f\u76f8 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-09-06T09:09:30+00:00\",\"dateModified\":\"2026-09-06T09:09:30+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/101335.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/101335.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/101335.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"MySQL \u590d\u5408\u7d22\u5f15\u6df1\u5ea6\u5256\u6790\uff1a\u6700\u5de6\u5339\u914d\u3001ICP\u3001\u56de\u8868\u3001IO \u6a21\u5f0f\u5e95\u5c42\u771f\u76f8\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"MySQL \u590d\u5408\u7d22\u5f15\u6df1\u5ea6\u5256\u6790\uff1a\u6700\u5de6\u5339\u914d\u3001ICP\u3001\u56de\u8868\u3001IO \u6a21\u5f0f\u5e95\u5c42\u771f\u76f8 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/101335.html","og_locale":"zh_CN","og_type":"article","og_title":"MySQL \u590d\u5408\u7d22\u5f15\u6df1\u5ea6\u5256\u6790\uff1a\u6700\u5de6\u5339\u914d\u3001ICP\u3001\u56de\u8868\u3001IO \u6a21\u5f0f\u5e95\u5c42\u771f\u76f8 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6458\u8981&#xff1a;\u7f51\u4e0a\u5927\u91cf\u6559\u7a0b\u53ea\u8bb2\u6700\u5de6\u5339\u914d\u53e3\u8bc0&#xff0c;\u5f88\u5c11\u8bb2\u5e95\u5c42 B \u6811\u3001\u7d22\u5f15\u4e0b\u63a8 ICP\u3001\u56de\u8868\u3001\u987a\u5e8f\/\u968f\u673a IO\u3001BufferPool \u4e4b\u95f4\u7684\u5b8c\u6574\u94fe\u8def\u3002\u672c\u6587\u7ed3\u5408 Explain \u6267\u884c\u8ba1\u5212\u3001\u5e95\u5c42\u5b58\u50a8\u539f\u7406&#xff0c;\u628a\u9762\u8bd5\u9ad8\u9891\u5751\u4e00\u6b21\u6027\u8bb2\u900f\u3002 \u524d\u7f6e\u51c6\u5907 \u5efa\u8868\u4e0e\u590d\u5408\u7d22\u5f15&#xff1a; CREATE TABLE test(id INT PRIMARY KEY AUTO_INCREMENT,a INT,b INT,c INT ); -- \u521b\u5efa\u8054\u5408\u7d22\u5f15 idx(a,b","og_url":"https:\/\/www.wsisp.com\/helps\/101335.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-09-06T09:09:30+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/09\/20260906090928-6a9d2dc8362ad.gif"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"14 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/101335.html","url":"https:\/\/www.wsisp.com\/helps\/101335.html","name":"MySQL \u590d\u5408\u7d22\u5f15\u6df1\u5ea6\u5256\u6790\uff1a\u6700\u5de6\u5339\u914d\u3001ICP\u3001\u56de\u8868\u3001IO \u6a21\u5f0f\u5e95\u5c42\u771f\u76f8 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-09-06T09:09:30+00:00","dateModified":"2026-09-06T09:09:30+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/101335.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/101335.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/101335.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"MySQL \u590d\u5408\u7d22\u5f15\u6df1\u5ea6\u5256\u6790\uff1a\u6700\u5de6\u5339\u914d\u3001ICP\u3001\u56de\u8868\u3001IO \u6a21\u5f0f\u5e95\u5c42\u771f\u76f8"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/101335","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=101335"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/101335\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/101331"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=101335"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=101335"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=101335"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=101335"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}