{"id":112986,"date":"2026-10-05T10:41:08","date_gmt":"2026-10-05T02:41:08","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/112986.html"},"modified":"2026-10-05T10:41:08","modified_gmt":"2026-10-05T02:41:08","slug":"mysql%e6%a0%b8%e5%bf%83%e7%9f%a5%e8%af%86%e7%82%b9%e5%85%a8%e6%99%af%e8%af%a6%e8%a7%a3","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/112986.html","title":{"rendered":"MySQL\u6838\u5fc3\u77e5\u8bc6\u70b9\u5168\u666f\u8be6\u89e3"},"content":{"rendered":"<h2>MySQL \u6838\u5fc3\u77e5\u8bc6\u70b9\u5168\u666f\u8be6\u89e3&#xff08;2026 \u6700\u65b0\u7248&#xff09;<\/h2>\n<p>\u9002\u7528\u7248\u672c&#xff1a;\u672c\u6587\u4ee5 MySQL 8.0&#043; \u4e3a\u4e3b\u8109\u7edc&#xff0c;\u517c\u987e 5.7 \u91cd\u8981\u5dee\u5f02\u3002\u5185\u5bb9\u8986\u76d6\u67b6\u6784\u3001\u5b58\u50a8\u5f15\u64ce\u3001\u7d22\u5f15\u3001\u4e8b\u52a1\u3001MVCC\u3001\u9501\u3001\u65e5\u5fd7\u3001SQL \u4f18\u5316\u3001\u4e3b\u4ece\u590d\u5236\u3001\u5206\u5e93\u5206\u8868\u4e0e\u6570\u636e\u7c7b\u578b\u9009\u578b&#xff0c;\u914d\u5408\u6d41\u7a0b\u56fe\u4e0e\u7ed3\u6784\u56fe\u5e2e\u52a9\u5efa\u7acb\u5168\u5c40\u5fc3\u667a\u6a21\u578b\u3002<\/p>\n<p>\u4f5c\u8005&#xff1a;\u4e00\u4f4d\u60f3\u8fdb\u5927\u5382\u7684\u6811\u5148\u751f&#xff1a;Mr.Tree\u3002<\/p>\n<hr \/>\n<h3>\u76ee\u5f55<\/h3>\n<li>MySQL \u6574\u4f53\u67b6\u6784<\/li>\n<li>\u5b58\u50a8\u5f15\u64ce&#xff08;InnoDB \u6df1\u5ea6\u89e3\u6790&#xff09;<\/li>\n<li>\u7d22\u5f15\u539f\u7406\u4e0e\u5b9e\u6218<\/li>\n<li>\u4e8b\u52a1\u4e0e ACID<\/li>\n<li>MVCC \u591a\u7248\u672c\u5e76\u53d1\u63a7\u5236<\/li>\n<li>\u9501\u673a\u5236<\/li>\n<li>\u65e5\u5fd7\u7cfb\u7edf<\/li>\n<li>SQL \u4f18\u5316\u4e0e\u6162\u67e5\u8be2<\/li>\n<li>\u4e3b\u4ece\u590d\u5236\u4e0e\u9ad8\u53ef\u7528<\/li>\n<li>\u5206\u5e93\u5206\u8868<\/li>\n<li>\u6570\u636e\u7c7b\u578b\u4e0e\u8303\u5f0f\u8bbe\u8ba1<\/li>\n<li>MySQL 8.0 \u5173\u952e\u65b0\u7279\u6027\u901f\u89c8<\/li>\n<hr \/>\n<h3>\u4e00\u3001MySQL \u6574\u4f53\u67b6\u6784<\/h3>\n<h4>1.1 \u903b\u8f91\u5206\u5c42\u67b6\u6784<\/h4>\n<p>MySQL \u662f\u5178\u578b\u7684 \u5206\u5c42\u3001\u53ef\u63d2\u62d4\u5b58\u50a8\u5f15\u64ce \u67b6\u6784&#xff0c;\u81ea\u4e0a\u800c\u4e0b\u5206\u4e3a\u56db\u5c42&#xff1a;<\/p>\n<p>  #mermaid-svg-Rp8uvtZTC3Iz7u1p{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-Rp8uvtZTC3Iz7u1p .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#mermaid-svg-Rp8uvtZTC3Iz7u1p .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#mermaid-svg-Rp8uvtZTC3Iz7u1p .error-icon{fill:#552222;}#mermaid-svg-Rp8uvtZTC3Iz7u1p .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-Rp8uvtZTC3Iz7u1p .edge-thickness-normal{stroke-width:1px;}#mermaid-svg-Rp8uvtZTC3Iz7u1p .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-Rp8uvtZTC3Iz7u1p .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-Rp8uvtZTC3Iz7u1p .edge-thickness-invisible{stroke-width:0;fill:none;}#mermaid-svg-Rp8uvtZTC3Iz7u1p .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-Rp8uvtZTC3Iz7u1p .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-Rp8uvtZTC3Iz7u1p .marker{fill:#333333;stroke:#333333;}#mermaid-svg-Rp8uvtZTC3Iz7u1p .marker.cross{stroke:#333333;}#mermaid-svg-Rp8uvtZTC3Iz7u1p svg{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-Rp8uvtZTC3Iz7u1p p{margin:0;}#mermaid-svg-Rp8uvtZTC3Iz7u1p .label{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;color:#333;}#mermaid-svg-Rp8uvtZTC3Iz7u1p .cluster-label text{fill:#333;}#mermaid-svg-Rp8uvtZTC3Iz7u1p .cluster-label span{color:#333;}#mermaid-svg-Rp8uvtZTC3Iz7u1p .cluster-label span p{background-color:transparent;}#mermaid-svg-Rp8uvtZTC3Iz7u1p .label text,#mermaid-svg-Rp8uvtZTC3Iz7u1p span{fill:#333;color:#333;}#mermaid-svg-Rp8uvtZTC3Iz7u1p .node rect,#mermaid-svg-Rp8uvtZTC3Iz7u1p .node circle,#mermaid-svg-Rp8uvtZTC3Iz7u1p .node ellipse,#mermaid-svg-Rp8uvtZTC3Iz7u1p .node polygon,#mermaid-svg-Rp8uvtZTC3Iz7u1p .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-svg-Rp8uvtZTC3Iz7u1p .rough-node .label text,#mermaid-svg-Rp8uvtZTC3Iz7u1p .node .label text,#mermaid-svg-Rp8uvtZTC3Iz7u1p .image-shape .label,#mermaid-svg-Rp8uvtZTC3Iz7u1p .icon-shape .label{text-anchor:middle;}#mermaid-svg-Rp8uvtZTC3Iz7u1p .node .katex path{fill:#000;stroke:#000;stroke-width:1px;}#mermaid-svg-Rp8uvtZTC3Iz7u1p .rough-node .label,#mermaid-svg-Rp8uvtZTC3Iz7u1p .node .label,#mermaid-svg-Rp8uvtZTC3Iz7u1p .image-shape .label,#mermaid-svg-Rp8uvtZTC3Iz7u1p .icon-shape .label{text-align:center;}#mermaid-svg-Rp8uvtZTC3Iz7u1p .node.clickable{cursor:pointer;}#mermaid-svg-Rp8uvtZTC3Iz7u1p .root .anchor path{fill:#333333!important;stroke-width:0;stroke:#333333;}#mermaid-svg-Rp8uvtZTC3Iz7u1p .arrowheadPath{fill:#333333;}#mermaid-svg-Rp8uvtZTC3Iz7u1p .edgePath .path{stroke:#333333;stroke-width:2.0px;}#mermaid-svg-Rp8uvtZTC3Iz7u1p .flowchart-link{stroke:#333333;fill:none;}#mermaid-svg-Rp8uvtZTC3Iz7u1p .edgeLabel{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-Rp8uvtZTC3Iz7u1p .edgeLabel p{background-color:rgba(232,232,232, 0.8);}#mermaid-svg-Rp8uvtZTC3Iz7u1p .edgeLabel rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-Rp8uvtZTC3Iz7u1p .labelBkg{background-color:rgba(232, 232, 232, 0.5);}#mermaid-svg-Rp8uvtZTC3Iz7u1p .cluster rect{fill:#ffffde;stroke:#aaaa33;stroke-width:1px;}#mermaid-svg-Rp8uvtZTC3Iz7u1p .cluster text{fill:#333;}#mermaid-svg-Rp8uvtZTC3Iz7u1p .cluster span{color:#333;}#mermaid-svg-Rp8uvtZTC3Iz7u1p 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-Rp8uvtZTC3Iz7u1p .flowchartTitleText{text-anchor:middle;font-size:18px;fill:#333;}#mermaid-svg-Rp8uvtZTC3Iz7u1p rect.text{fill:none;stroke-width:0;}#mermaid-svg-Rp8uvtZTC3Iz7u1p .icon-shape,#mermaid-svg-Rp8uvtZTC3Iz7u1p .image-shape{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-Rp8uvtZTC3Iz7u1p .icon-shape p,#mermaid-svg-Rp8uvtZTC3Iz7u1p .image-shape p{background-color:rgba(232,232,232, 0.8);padding:2px;}#mermaid-svg-Rp8uvtZTC3Iz7u1p .icon-shape .label rect,#mermaid-svg-Rp8uvtZTC3Iz7u1p .image-shape .label rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-Rp8uvtZTC3Iz7u1p .label-icon{display:inline-block;height:1em;overflow:visible;vertical-align:-0.125em;}#mermaid-svg-Rp8uvtZTC3Iz7u1p .node .label-icon path{fill:currentColor;stroke:revert;stroke-width:revert;}#mermaid-svg-Rp8uvtZTC3Iz7u1p :root{&#8211;mermaid-font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;}<\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>\u6587\u4ef6\u7cfb\u7edf\u5c42 File System<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>\u5b58\u50a8\u5f15\u64ce\u5c42 Storage Engine<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>\u670d\u52a1\u5c42 Server Layer<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>\u8fde\u63a5\u5c42 Connection Layer<\/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=\"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=\"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=\"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=\"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=\"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=\"edgeLabel\"><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>\u5ba2\u6237\u7aef JDBC\/ODBC\/CLI<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>\u8fde\u63a5\u6c60 Connection Pool\u8ba4\u8bc1\/\u9274\u6743\/\u7ebf\u7a0b\u590d\u7528<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>SQL Interface \u63a5\u53e3<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>Parser \u89e3\u6790\u5668\u8bcd\u6cd5&#043;\u8bed\u6cd5&#043;AST<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>Optimizer \u4f18\u5316\u5668CBO \u6210\u672c\u6a21\u578b<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>Cache &amp; Buffer8.0 \u5df2\u79fb\u9664\u67e5\u8be2\u7f13\u5b58<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>InnoDB<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>MyISAM<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>Memory<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>Archive<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>\u6570\u636e\u6587\u4ef6 .ibd<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>Redo Log<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>Undo Log<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>Binlog<\/p>\n<p><\/span><\/p>\n<p>\u8bbe\u8ba1\u8981\u70b9\u4e0e\u9009\u578b\u4f9d\u636e<\/p>\n<ul>\n<li>\u8fde\u63a5\u5c42&#xff1a;\u8d1f\u8d23 TCP \u63e1\u624b\u3001\u8eab\u4efd\u8ba4\u8bc1&#xff08;MySQL 8.0 \u9ed8\u8ba4 caching_sha2_password&#xff09;\u3001\u7ef4\u62a4\u8fde\u63a5\u7ebf\u7a0b\u3002\u8fde\u63a5\u6570\u7531 max_connections \u63a7\u5236&#xff0c;\u77ed\u8fde\u63a5\u98ce\u66b4\u6613\u6253\u6ee1\u8fde\u63a5\u6c60&#xff0c;\u5efa\u8bae\u7528\u8fde\u63a5\u6c60&#xff08;HikariCP\/Druid&#xff09;\u590d\u7528\u3002<\/li>\n<li>\u670d\u52a1\u5c42&#xff1a;\u6240\u6709\u5b58\u50a8\u5f15\u64ce\u5171\u4eab\u3002\u4f18\u5316\u5668\u57fa\u4e8e \u6210\u672c&#xff08;Cost Based&#xff09; \u9009\u62e9\u6267\u884c\u8ba1\u5212&#xff0c;\u800c\u975e\u89c4\u5219\u3002<\/li>\n<li>\u5b58\u50a8\u5f15\u64ce\u5c42&#xff1a;\u63d2\u4ef6\u5f0f\u8bbe\u8ba1&#xff0c;\u771f\u6b63\u8d1f\u8d23\u6570\u636e\u7684\u5b58\u50a8\u4e0e\u63d0\u53d6\u3002MySQL 5.5 \u8d77\u9ed8\u8ba4\u5f15\u64ce\u4e3a InnoDB\u3002<\/li>\n<li>\u4f18\u7f3a\u70b9\u5bf9\u6bd4&#xff1a;\u5206\u5c42\u89e3\u8026\u5e26\u6765\u6781\u5f3a\u6269\u5c55\u6027&#xff08;\u53ef\u81ea\u7814\u5f15\u64ce&#xff09;&#xff0c;\u4f46\u4e5f\u5bfc\u81f4\u670d\u52a1\u5c42\u4e0e\u5f15\u64ce\u5c42\u8bed\u4e49\u91cd\u590d&#xff08;\u5982\u6743\u9650\u3001\u8ba1\u6570&#xff09;&#xff0c;\u8de8\u5f15\u64ce join \u6709\u989d\u5916\u5f00\u9500\u3002<\/li>\n<\/ul>\n<h4>1.2 \u4e00\u6761 SELECT \u8bed\u53e5\u7684\u5b8c\u6574\u6267\u884c\u6d41\u7a0b<\/h4>\n<p>  #mermaid-svg-kV5w45AvOAgCRhff{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-kV5w45AvOAgCRhff .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#mermaid-svg-kV5w45AvOAgCRhff .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#mermaid-svg-kV5w45AvOAgCRhff .error-icon{fill:#552222;}#mermaid-svg-kV5w45AvOAgCRhff .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-kV5w45AvOAgCRhff .edge-thickness-normal{stroke-width:1px;}#mermaid-svg-kV5w45AvOAgCRhff .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-kV5w45AvOAgCRhff .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-kV5w45AvOAgCRhff .edge-thickness-invisible{stroke-width:0;fill:none;}#mermaid-svg-kV5w45AvOAgCRhff .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-kV5w45AvOAgCRhff .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-kV5w45AvOAgCRhff .marker{fill:#333333;stroke:#333333;}#mermaid-svg-kV5w45AvOAgCRhff .marker.cross{stroke:#333333;}#mermaid-svg-kV5w45AvOAgCRhff svg{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-kV5w45AvOAgCRhff p{margin:0;}#mermaid-svg-kV5w45AvOAgCRhff .label{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;color:#333;}#mermaid-svg-kV5w45AvOAgCRhff .cluster-label text{fill:#333;}#mermaid-svg-kV5w45AvOAgCRhff .cluster-label span{color:#333;}#mermaid-svg-kV5w45AvOAgCRhff .cluster-label span p{background-color:transparent;}#mermaid-svg-kV5w45AvOAgCRhff .label text,#mermaid-svg-kV5w45AvOAgCRhff span{fill:#333;color:#333;}#mermaid-svg-kV5w45AvOAgCRhff .node rect,#mermaid-svg-kV5w45AvOAgCRhff .node circle,#mermaid-svg-kV5w45AvOAgCRhff .node ellipse,#mermaid-svg-kV5w45AvOAgCRhff .node polygon,#mermaid-svg-kV5w45AvOAgCRhff .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-svg-kV5w45AvOAgCRhff .rough-node .label text,#mermaid-svg-kV5w45AvOAgCRhff .node .label text,#mermaid-svg-kV5w45AvOAgCRhff .image-shape .label,#mermaid-svg-kV5w45AvOAgCRhff .icon-shape .label{text-anchor:middle;}#mermaid-svg-kV5w45AvOAgCRhff .node .katex path{fill:#000;stroke:#000;stroke-width:1px;}#mermaid-svg-kV5w45AvOAgCRhff .rough-node .label,#mermaid-svg-kV5w45AvOAgCRhff .node .label,#mermaid-svg-kV5w45AvOAgCRhff .image-shape .label,#mermaid-svg-kV5w45AvOAgCRhff .icon-shape .label{text-align:center;}#mermaid-svg-kV5w45AvOAgCRhff .node.clickable{cursor:pointer;}#mermaid-svg-kV5w45AvOAgCRhff .root .anchor path{fill:#333333!important;stroke-width:0;stroke:#333333;}#mermaid-svg-kV5w45AvOAgCRhff .arrowheadPath{fill:#333333;}#mermaid-svg-kV5w45AvOAgCRhff .edgePath .path{stroke:#333333;stroke-width:2.0px;}#mermaid-svg-kV5w45AvOAgCRhff .flowchart-link{stroke:#333333;fill:none;}#mermaid-svg-kV5w45AvOAgCRhff .edgeLabel{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-kV5w45AvOAgCRhff .edgeLabel p{background-color:rgba(232,232,232, 0.8);}#mermaid-svg-kV5w45AvOAgCRhff .edgeLabel rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-kV5w45AvOAgCRhff .labelBkg{background-color:rgba(232, 232, 232, 0.5);}#mermaid-svg-kV5w45AvOAgCRhff .cluster rect{fill:#ffffde;stroke:#aaaa33;stroke-width:1px;}#mermaid-svg-kV5w45AvOAgCRhff .cluster text{fill:#333;}#mermaid-svg-kV5w45AvOAgCRhff .cluster span{color:#333;}#mermaid-svg-kV5w45AvOAgCRhff 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-kV5w45AvOAgCRhff .flowchartTitleText{text-anchor:middle;font-size:18px;fill:#333;}#mermaid-svg-kV5w45AvOAgCRhff rect.text{fill:none;stroke-width:0;}#mermaid-svg-kV5w45AvOAgCRhff .icon-shape,#mermaid-svg-kV5w45AvOAgCRhff .image-shape{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-kV5w45AvOAgCRhff .icon-shape p,#mermaid-svg-kV5w45AvOAgCRhff .image-shape p{background-color:rgba(232,232,232, 0.8);padding:2px;}#mermaid-svg-kV5w45AvOAgCRhff .icon-shape .label rect,#mermaid-svg-kV5w45AvOAgCRhff .image-shape .label rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-kV5w45AvOAgCRhff .label-icon{display:inline-block;height:1em;overflow:visible;vertical-align:-0.125em;}#mermaid-svg-kV5w45AvOAgCRhff .node .label-icon path{fill:currentColor;stroke:revert;stroke-width:revert;}#mermaid-svg-kV5w45AvOAgCRhff :root{&#8211;mermaid-font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;}<\/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=\"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>\u5ba2\u6237\u7aef\u53d1\u9001 SQL<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>\u8fde\u63a5\u5668: \u9274\u6743\/\u53d6\u6743\u9650<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>\u67e5\u8be2\u7f13\u5b588.0 \u5df2\u79fb\u9664<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>\u89e3\u6790\u5668: \u8bcd\u6cd5\u8bed\u6cd5\u6821\u9a8c<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>\u9884\u5904\u7406\u5668: \u8868\/\u5217\u662f\u5426\u5b58\u5728<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>\u4f18\u5316\u5668: \u751f\u6210\u6267\u884c\u8ba1\u5212\u7d22\u5f15\u9009\u62e9\/\u8fde\u63a5\u987a\u5e8f<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>\u6267\u884c\u5668: \u8c03\u7528\u5f15\u64ce API<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>InnoDB \u7f13\u51b2\u533a\/B&#043;\u6811\u68c0\u7d22<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>\u8fd4\u56de\u7ed3\u679c\u96c6<\/p>\n<p><\/span><\/p>\n<p>\u5173\u952e\u7ed3\u8bba&#xff1a;\u67e5\u8be2\u7f13\u5b58\u5728 8.0 \u88ab\u79fb\u9664&#xff0c;\u56e0\u4e3a\u53ea\u8981\u8868\u6709\u66f4\u65b0&#xff0c;\u8be5\u8868\u6240\u6709\u7f13\u5b58\u5373\u5931\u6548&#xff0c;\u547d\u4e2d\u7387\u6781\u4f4e\u4e14\u7ef4\u62a4\u6210\u672c\u9ad8\u3002<\/p>\n<hr \/>\n<h3>\u4e8c\u3001\u5b58\u50a8\u5f15\u64ce&#xff08;InnoDB \u6df1\u5ea6\u89e3\u6790&#xff09;<\/h3>\n<h4>2.1 InnoDB \u4e0e MyISAM \u5bf9\u6bd4<\/h4>\n<table>\n<tr>\u7ef4\u5ea6InnoDB&#xff08;\u63a8\u8350&#xff09;MyISAM&#xff08;\u5df2\u8fc7\u65f6&#xff09;<\/tr>\n<tbody>\n<tr>\n<td>\u4e8b\u52a1<\/td>\n<td>\u2705 \u652f\u6301 ACID<\/td>\n<td>\u274c \u4e0d\u652f\u6301<\/td>\n<\/tr>\n<tr>\n<td>\u884c\u7ea7\u9501<\/td>\n<td>\u2705 \u9ed8\u8ba4\u884c\u9501<\/td>\n<td>\u274c \u4ec5\u8868\u9501<\/td>\n<\/tr>\n<tr>\n<td>\u5916\u952e<\/td>\n<td>\u2705 \u652f\u6301<\/td>\n<td>\u274c \u4e0d\u652f\u6301<\/td>\n<\/tr>\n<tr>\n<td>\u5d29\u6e83\u6062\u590d<\/td>\n<td>\u2705 Redo\/Undo \u4fdd\u969c<\/td>\n<td>\u274c \u6613\u635f\u574f\u9700 repair<\/td>\n<\/tr>\n<tr>\n<td>\u805a\u7c07\u7d22\u5f15<\/td>\n<td>\u2705 \u6570\u636e\u5373\u7d22\u5f15<\/td>\n<td>\u274c \u975e\u805a\u7c07&#xff0c;\u7d22\u5f15\u4e0e\u6570\u636e\u5206\u79bb<\/td>\n<\/tr>\n<tr>\n<td>\u5168\u6587\u7d22\u5f15<\/td>\n<td>\u2705 5.6&#043; \u652f\u6301<\/td>\n<td>\u2705 \u65e9\u671f\u552f\u4e00\u652f\u6301\u65b9<\/td>\n<\/tr>\n<tr>\n<td>\u538b\u7f29<\/td>\n<td>\u2705 \u652f\u6301<\/td>\n<td>\u274c<\/td>\n<\/tr>\n<tr>\n<td>\u9002\u7528\u573a\u666f<\/td>\n<td>\u7edd\u5927\u591a\u6570 OLTP<\/td>\n<td>\u53ea\u8bfb\/\u62a5\u8868&#xff08;\u6781\u5c11\u7528&#xff09;<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u9009\u578b\u7ed3\u8bba&#xff1a;\u9664\u6781\u7279\u6b8a\u7684\u53ea\u8bfb\u3001\u6781\u5c11\u5199\u3001\u65e0\u4e8b\u52a1\u9700\u6c42\u7684\u62a5\u8868\u573a\u666f&#xff0c;\u4e00\u5f8b\u4f7f\u7528 InnoDB\u3002MyISAM \u7684\u8868\u7ea7\u9501\u5728\u9ad8\u5e76\u53d1\u5199\u5165\u4e0b\u662f\u81f4\u547d\u74f6\u9888\u3002<\/p>\n<h4>2.2 InnoDB \u5185\u5b58\u4e0e\u78c1\u76d8\u7ed3\u6784<\/h4>\n<p>  #mermaid-svg-zRNk5sqvHlpuZ7Lo{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-zRNk5sqvHlpuZ7Lo .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#mermaid-svg-zRNk5sqvHlpuZ7Lo .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#mermaid-svg-zRNk5sqvHlpuZ7Lo .error-icon{fill:#552222;}#mermaid-svg-zRNk5sqvHlpuZ7Lo .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-zRNk5sqvHlpuZ7Lo .edge-thickness-normal{stroke-width:1px;}#mermaid-svg-zRNk5sqvHlpuZ7Lo .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-zRNk5sqvHlpuZ7Lo .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-zRNk5sqvHlpuZ7Lo .edge-thickness-invisible{stroke-width:0;fill:none;}#mermaid-svg-zRNk5sqvHlpuZ7Lo .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-zRNk5sqvHlpuZ7Lo .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-zRNk5sqvHlpuZ7Lo .marker{fill:#333333;stroke:#333333;}#mermaid-svg-zRNk5sqvHlpuZ7Lo .marker.cross{stroke:#333333;}#mermaid-svg-zRNk5sqvHlpuZ7Lo svg{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-zRNk5sqvHlpuZ7Lo p{margin:0;}#mermaid-svg-zRNk5sqvHlpuZ7Lo .label{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;color:#333;}#mermaid-svg-zRNk5sqvHlpuZ7Lo .cluster-label text{fill:#333;}#mermaid-svg-zRNk5sqvHlpuZ7Lo .cluster-label span{color:#333;}#mermaid-svg-zRNk5sqvHlpuZ7Lo .cluster-label span p{background-color:transparent;}#mermaid-svg-zRNk5sqvHlpuZ7Lo .label text,#mermaid-svg-zRNk5sqvHlpuZ7Lo span{fill:#333;color:#333;}#mermaid-svg-zRNk5sqvHlpuZ7Lo .node rect,#mermaid-svg-zRNk5sqvHlpuZ7Lo .node circle,#mermaid-svg-zRNk5sqvHlpuZ7Lo .node ellipse,#mermaid-svg-zRNk5sqvHlpuZ7Lo .node polygon,#mermaid-svg-zRNk5sqvHlpuZ7Lo .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-svg-zRNk5sqvHlpuZ7Lo .rough-node .label text,#mermaid-svg-zRNk5sqvHlpuZ7Lo .node .label text,#mermaid-svg-zRNk5sqvHlpuZ7Lo .image-shape .label,#mermaid-svg-zRNk5sqvHlpuZ7Lo .icon-shape .label{text-anchor:middle;}#mermaid-svg-zRNk5sqvHlpuZ7Lo .node .katex path{fill:#000;stroke:#000;stroke-width:1px;}#mermaid-svg-zRNk5sqvHlpuZ7Lo .rough-node .label,#mermaid-svg-zRNk5sqvHlpuZ7Lo .node .label,#mermaid-svg-zRNk5sqvHlpuZ7Lo .image-shape .label,#mermaid-svg-zRNk5sqvHlpuZ7Lo .icon-shape .label{text-align:center;}#mermaid-svg-zRNk5sqvHlpuZ7Lo .node.clickable{cursor:pointer;}#mermaid-svg-zRNk5sqvHlpuZ7Lo .root .anchor path{fill:#333333!important;stroke-width:0;stroke:#333333;}#mermaid-svg-zRNk5sqvHlpuZ7Lo .arrowheadPath{fill:#333333;}#mermaid-svg-zRNk5sqvHlpuZ7Lo .edgePath .path{stroke:#333333;stroke-width:2.0px;}#mermaid-svg-zRNk5sqvHlpuZ7Lo .flowchart-link{stroke:#333333;fill:none;}#mermaid-svg-zRNk5sqvHlpuZ7Lo .edgeLabel{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-zRNk5sqvHlpuZ7Lo .edgeLabel p{background-color:rgba(232,232,232, 0.8);}#mermaid-svg-zRNk5sqvHlpuZ7Lo .edgeLabel rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-zRNk5sqvHlpuZ7Lo .labelBkg{background-color:rgba(232, 232, 232, 0.5);}#mermaid-svg-zRNk5sqvHlpuZ7Lo .cluster rect{fill:#ffffde;stroke:#aaaa33;stroke-width:1px;}#mermaid-svg-zRNk5sqvHlpuZ7Lo .cluster text{fill:#333;}#mermaid-svg-zRNk5sqvHlpuZ7Lo .cluster span{color:#333;}#mermaid-svg-zRNk5sqvHlpuZ7Lo 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-zRNk5sqvHlpuZ7Lo .flowchartTitleText{text-anchor:middle;font-size:18px;fill:#333;}#mermaid-svg-zRNk5sqvHlpuZ7Lo rect.text{fill:none;stroke-width:0;}#mermaid-svg-zRNk5sqvHlpuZ7Lo .icon-shape,#mermaid-svg-zRNk5sqvHlpuZ7Lo .image-shape{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-zRNk5sqvHlpuZ7Lo .icon-shape p,#mermaid-svg-zRNk5sqvHlpuZ7Lo .image-shape p{background-color:rgba(232,232,232, 0.8);padding:2px;}#mermaid-svg-zRNk5sqvHlpuZ7Lo .icon-shape .label rect,#mermaid-svg-zRNk5sqvHlpuZ7Lo .image-shape .label rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-zRNk5sqvHlpuZ7Lo .label-icon{display:inline-block;height:1em;overflow:visible;vertical-align:-0.125em;}#mermaid-svg-zRNk5sqvHlpuZ7Lo .node .label-icon path{fill:currentColor;stroke:revert;stroke-width:revert;}#mermaid-svg-zRNk5sqvHlpuZ7Lo :root{&#8211;mermaid-font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;}<\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>\u78c1\u76d8\u7ed3\u6784<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>\u5185\u5b58\u7ed3\u6784<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"edgeLabel\"><\/p>\n<p>\u810f\u9875\u5237\u76d8<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"edgeLabel\"><\/p>\n<p>merge<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"edgeLabel\"><\/p>\n<p>\u987a\u5e8f\u5199<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"edgeLabel\"><\/p>\n<p>\u5305\u542b<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>Buffer Pool\u6570\u636e\u9875\/\u7d22\u5f15\u9875\u7f13\u5b58<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>Change Buffer\u975e\u552f\u4e00\u4e8c\u7ea7\u7d22\u5f15\u5199\u7f13\u51b2<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>Log BufferRedo Log \u7f13\u51b2<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>Adaptive Hash Index\u81ea\u9002\u5e94\u54c8\u5e0c\u7d22\u5f15<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>.ibd \u8868\u7a7a\u95f4\u6587\u4ef6\u6bb5\/\u533a\/\u9875<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>Redo Logib_logfile0\/1<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>Undo Tablespace\u56de\u6eda\/\u7248\u672c\u94fe<\/p>\n<p><\/span><\/p>\n<ul>\n<li>Buffer Pool&#xff1a;InnoDB \u6027\u80fd\u6838\u5fc3&#xff0c;\u9ed8\u8ba4\u5360\u7269\u7406\u5185\u5b58 60%~80%\u3002\u4ee5 \u9875&#xff08;16KB&#xff09; \u4e3a\u5355\u4f4d\u7f13\u5b58&#xff0c;\u91c7\u7528 LRU \u53d8\u4f53&#xff08;\u542b old \u533a&#xff09; \u9632\u6b62\u5168\u8868\u626b\u63cf\u6c61\u67d3\u70ed\u70b9\u6570\u636e\u3002<\/li>\n<li>Change Buffer&#xff1a;\u5bf9 \u975e\u552f\u4e00 \u4e8c\u7ea7\u7d22\u5f15\u7684\u5199\u64cd\u4f5c&#xff0c;\u82e5\u6570\u636e\u9875\u4e0d\u5728 Buffer Pool&#xff0c;\u5148\u7f13\u5b58\u5728 Change Buffer&#xff0c;\u5f85\u540e\u7eed\u8bfb\u5165\u65f6 merge&#xff0c;\u51cf\u5c11\u968f\u673a IO\u3002\u552f\u4e00\u7d22\u5f15\u56e0\u9700\u7acb\u5373\u6821\u9a8c\u552f\u4e00\u6027&#xff0c;\u65e0\u6cd5\u4f7f\u7528\u8be5\u673a\u5236\u3002<\/li>\n<li>Redo Log&#xff1a;\u5faa\u73af\u5199\u3001\u987a\u5e8f\u5199&#xff0c;\u4fdd\u8bc1\u5df2\u63d0\u4ea4\u4e8b\u52a1\u7684\u6301\u4e45\u6027&#xff08;crash-safe&#xff09;\u3002<\/li>\n<\/ul>\n<hr \/>\n<h3>\u4e09\u3001\u7d22\u5f15\u539f\u7406\u4e0e\u5b9e\u6218<\/h3>\n<h4>3.1 \u4e3a\u4ec0\u4e48\u662f B&#043; \u6811&#xff1f;<\/h4>\n<p>\u7d22\u5f15\u7684\u672c\u8d28\u662f \u7528\u7a7a\u95f4\u6362\u65f6\u95f4&#xff0c;\u8ba9\u67e5\u627e\u4ece\u5168\u8868\u626b\u63cf\u7684 O(N) \u964d\u5230 O(log N)\u3002\u4e3b\u6d41\u5019\u9009\u7ed3\u6784\u5bf9\u6bd4&#xff1a;<\/p>\n<table>\n<tr>\u7ed3\u6784\u67e5\u627e\u590d\u6742\u5ea6\u8303\u56f4\u67e5\u8be2\u78c1\u76d8\u53cb\u597d\u7ed3\u8bba<\/tr>\n<tbody>\n<tr>\n<td>\u54c8\u5e0c\u8868<\/td>\n<td>O(1)<\/td>\n<td>\u274c \u4e0d\u652f\u6301<\/td>\n<td>\u4e00\u822c<\/td>\n<td>\u4ec5\u7b49\u503c&#xff0c;Memory \u5f15\u64ce\u7528<\/td>\n<\/tr>\n<tr>\n<td>\u4e8c\u53c9\u641c\u7d22\u6811<\/td>\n<td>O(logN)<\/td>\n<td>\u26a0\ufe0f \u4e2d\u5e8f\u904d\u5386<\/td>\n<td>\u274c \u6811\u9ad8\u8fc7\u5927<\/td>\n<td>\u6613\u9000\u5316<\/td>\n<\/tr>\n<tr>\n<td>\u7ea2\u9ed1\u6811<\/td>\n<td>O(logN)<\/td>\n<td>\u26a0\ufe0f<\/td>\n<td>\u274c \u8282\u70b9\u5c0f\u3001IO \u591a<\/td>\n<td>\u4e0d\u9002\u5408\u78c1\u76d8<\/td>\n<\/tr>\n<tr>\n<td>B \u6811<\/td>\n<td>O(logN)<\/td>\n<td>\u26a0\ufe0f<\/td>\n<td>\u2705<\/td>\n<td>\u8282\u70b9\u5b58\u6570\u636e&#xff0c;\u6247\u51fa\u4f4e<\/td>\n<\/tr>\n<tr>\n<td>B&#043; \u6811<\/td>\n<td>O(logN)<\/td>\n<td>\u2705 \u53f6\u5b50\u94fe\u8868<\/td>\n<td>\u2705 \u6247\u51fa\u9ad8<\/td>\n<td>MySQL \u552f\u4e00\u9009\u62e9<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>B&#043; \u6811\u6838\u5fc3\u4f18\u52bf&#xff1a;<\/p>\n<li>\u975e\u53f6\u5b50\u8282\u70b9\u53ea\u5b58 key&#xff0c;\u5355\u9875\u80fd\u5bb9\u7eb3\u66f4\u591a\u952e\u503c&#xff0c;\u6811\u66f4\u77ee&#xff08;3~4 \u5c42\u5373\u53ef\u5b58\u5343\u4e07\u7ea7\u6570\u636e&#xff09;&#xff0c;\u51cf\u5c11\u78c1\u76d8 IO \u6b21\u6570\u3002<\/li>\n<li>\u53f6\u5b50\u8282\u70b9\u7528\u53cc\u5411\u94fe\u8868\u4e32\u8054&#xff0c;\u5929\u7136\u652f\u6301\u9ad8\u6548\u8303\u56f4\u67e5\u8be2&#xff08;WHERE id BETWEEN 100 AND 200&#xff09;\u3002<\/li>\n<li>\u6570\u636e\u5168\u90e8\u5728\u53f6\u5b50\u8282\u70b9&#xff0c;\u67e5\u8be2\u590d\u6742\u5ea6\u7a33\u5b9a&#xff0c;\u4e0d\u8d70&#034;\u8fd0\u6c14\u597d\u547d\u4e2d\u4e0a\u5c42&#034;\u7684\u4e0d\u7a33\u5b9a\u8def\u5f84\u3002<\/li>\n<p>  #mermaid-svg-iicNYLmWkoP2F068{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-iicNYLmWkoP2F068 .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#mermaid-svg-iicNYLmWkoP2F068 .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#mermaid-svg-iicNYLmWkoP2F068 .error-icon{fill:#552222;}#mermaid-svg-iicNYLmWkoP2F068 .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-iicNYLmWkoP2F068 .edge-thickness-normal{stroke-width:1px;}#mermaid-svg-iicNYLmWkoP2F068 .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-iicNYLmWkoP2F068 .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-iicNYLmWkoP2F068 .edge-thickness-invisible{stroke-width:0;fill:none;}#mermaid-svg-iicNYLmWkoP2F068 .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-iicNYLmWkoP2F068 .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-iicNYLmWkoP2F068 .marker{fill:#333333;stroke:#333333;}#mermaid-svg-iicNYLmWkoP2F068 .marker.cross{stroke:#333333;}#mermaid-svg-iicNYLmWkoP2F068 svg{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-iicNYLmWkoP2F068 p{margin:0;}#mermaid-svg-iicNYLmWkoP2F068 .label{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;color:#333;}#mermaid-svg-iicNYLmWkoP2F068 .cluster-label text{fill:#333;}#mermaid-svg-iicNYLmWkoP2F068 .cluster-label span{color:#333;}#mermaid-svg-iicNYLmWkoP2F068 .cluster-label span p{background-color:transparent;}#mermaid-svg-iicNYLmWkoP2F068 .label text,#mermaid-svg-iicNYLmWkoP2F068 span{fill:#333;color:#333;}#mermaid-svg-iicNYLmWkoP2F068 .node rect,#mermaid-svg-iicNYLmWkoP2F068 .node circle,#mermaid-svg-iicNYLmWkoP2F068 .node ellipse,#mermaid-svg-iicNYLmWkoP2F068 .node polygon,#mermaid-svg-iicNYLmWkoP2F068 .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-svg-iicNYLmWkoP2F068 .rough-node .label text,#mermaid-svg-iicNYLmWkoP2F068 .node .label text,#mermaid-svg-iicNYLmWkoP2F068 .image-shape .label,#mermaid-svg-iicNYLmWkoP2F068 .icon-shape .label{text-anchor:middle;}#mermaid-svg-iicNYLmWkoP2F068 .node .katex path{fill:#000;stroke:#000;stroke-width:1px;}#mermaid-svg-iicNYLmWkoP2F068 .rough-node .label,#mermaid-svg-iicNYLmWkoP2F068 .node .label,#mermaid-svg-iicNYLmWkoP2F068 .image-shape .label,#mermaid-svg-iicNYLmWkoP2F068 .icon-shape .label{text-align:center;}#mermaid-svg-iicNYLmWkoP2F068 .node.clickable{cursor:pointer;}#mermaid-svg-iicNYLmWkoP2F068 .root .anchor path{fill:#333333!important;stroke-width:0;stroke:#333333;}#mermaid-svg-iicNYLmWkoP2F068 .arrowheadPath{fill:#333333;}#mermaid-svg-iicNYLmWkoP2F068 .edgePath .path{stroke:#333333;stroke-width:2.0px;}#mermaid-svg-iicNYLmWkoP2F068 .flowchart-link{stroke:#333333;fill:none;}#mermaid-svg-iicNYLmWkoP2F068 .edgeLabel{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-iicNYLmWkoP2F068 .edgeLabel p{background-color:rgba(232,232,232, 0.8);}#mermaid-svg-iicNYLmWkoP2F068 .edgeLabel rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-iicNYLmWkoP2F068 .labelBkg{background-color:rgba(232, 232, 232, 0.5);}#mermaid-svg-iicNYLmWkoP2F068 .cluster rect{fill:#ffffde;stroke:#aaaa33;stroke-width:1px;}#mermaid-svg-iicNYLmWkoP2F068 .cluster text{fill:#333;}#mermaid-svg-iicNYLmWkoP2F068 .cluster span{color:#333;}#mermaid-svg-iicNYLmWkoP2F068 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-iicNYLmWkoP2F068 .flowchartTitleText{text-anchor:middle;font-size:18px;fill:#333;}#mermaid-svg-iicNYLmWkoP2F068 rect.text{fill:none;stroke-width:0;}#mermaid-svg-iicNYLmWkoP2F068 .icon-shape,#mermaid-svg-iicNYLmWkoP2F068 .image-shape{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-iicNYLmWkoP2F068 .icon-shape p,#mermaid-svg-iicNYLmWkoP2F068 .image-shape p{background-color:rgba(232,232,232, 0.8);padding:2px;}#mermaid-svg-iicNYLmWkoP2F068 .icon-shape .label rect,#mermaid-svg-iicNYLmWkoP2F068 .image-shape .label rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-iicNYLmWkoP2F068 .label-icon{display:inline-block;height:1em;overflow:visible;vertical-align:-0.125em;}#mermaid-svg-iicNYLmWkoP2F068 .node .label-icon path{fill:currentColor;stroke:revert;stroke-width:revert;}#mermaid-svg-iicNYLmWkoP2F068 :root{&#8211;mermaid-font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;}<\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>\u53f6\u5b50\u8282\u70b9&#xff08;\u5b58\u6570\u636e&#xff0c;\u53cc\u5411\u94fe\u8868\u4e32\u8054&#xff09;<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>\u4e2d\u95f4\u8282\u70b9&#xff08;\u975e\u53f6\u5b50&#xff0c;\u53ea\u5b58\u952e&#xff09;<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>\u6839\u8282\u70b9&#xff08;\u975e\u53f6\u5b50&#xff0c;\u53ea\u5b58\u952e&#xff09;<\/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=\"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=\"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>10<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>30<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>50<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>4 7<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>12 18 25<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>33 41<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>55 60 70<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>1 4 7<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>12 18 25<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>33 41<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>55 60 70<\/p>\n<p><\/span><\/p>\n<h4>3.2 \u805a\u7c07\u7d22\u5f15 vs \u4e8c\u7ea7\u7d22\u5f15&#xff08;\u56de\u8868&#xff09;<\/h4>\n<ul>\n<li>\u805a\u7c07\u7d22\u5f15&#xff08;Clustered Index&#xff09;&#xff1a;InnoDB \u7528 \u4e3b\u952e \u6784\u5efa&#xff0c;\u53f6\u5b50\u8282\u70b9\u5b58 \u6574\u884c\u6570\u636e\u3002\u4e00\u5f20\u8868\u53ea\u6709\u4e00\u4e2a\u3002\u82e5\u672a\u663e\u5f0f\u5b9a\u4e49\u4e3b\u952e&#xff0c;\u5f15\u64ce\u4f1a\u9009\u552f\u4e00\u975e\u7a7a\u7d22\u5f15&#xff1b;\u82e5\u90fd\u6ca1\u6709&#xff0c;\u9690\u5f0f\u751f\u6210 6 \u5b57\u8282 row_id\u3002<\/li>\n<li>\u4e8c\u7ea7\u7d22\u5f15&#xff08;Secondary Index&#xff09;&#xff1a;\u53f6\u5b50\u8282\u70b9\u5b58 \u7d22\u5f15\u5217\u503c &#043; \u4e3b\u952e\u503c\u3002\u901a\u8fc7\u4e8c\u7ea7\u7d22\u5f15\u67e5\u975e\u7d22\u5f15\u5217\u65f6&#xff0c;\u9700 \u56de\u8868&#xff08;\u7528\u4e3b\u952e\u518d\u67e5\u805a\u7c07\u7d22\u5f15&#xff09;\u3002<\/li>\n<\/ul>\n<p>  #mermaid-svg-ACKLiAbPii6dNeQH{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-ACKLiAbPii6dNeQH .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#mermaid-svg-ACKLiAbPii6dNeQH .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#mermaid-svg-ACKLiAbPii6dNeQH .error-icon{fill:#552222;}#mermaid-svg-ACKLiAbPii6dNeQH .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-ACKLiAbPii6dNeQH .edge-thickness-normal{stroke-width:1px;}#mermaid-svg-ACKLiAbPii6dNeQH .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-ACKLiAbPii6dNeQH .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-ACKLiAbPii6dNeQH .edge-thickness-invisible{stroke-width:0;fill:none;}#mermaid-svg-ACKLiAbPii6dNeQH .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-ACKLiAbPii6dNeQH .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-ACKLiAbPii6dNeQH .marker{fill:#333333;stroke:#333333;}#mermaid-svg-ACKLiAbPii6dNeQH .marker.cross{stroke:#333333;}#mermaid-svg-ACKLiAbPii6dNeQH svg{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-ACKLiAbPii6dNeQH p{margin:0;}#mermaid-svg-ACKLiAbPii6dNeQH .label{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;color:#333;}#mermaid-svg-ACKLiAbPii6dNeQH .cluster-label text{fill:#333;}#mermaid-svg-ACKLiAbPii6dNeQH .cluster-label span{color:#333;}#mermaid-svg-ACKLiAbPii6dNeQH .cluster-label span p{background-color:transparent;}#mermaid-svg-ACKLiAbPii6dNeQH .label text,#mermaid-svg-ACKLiAbPii6dNeQH span{fill:#333;color:#333;}#mermaid-svg-ACKLiAbPii6dNeQH .node rect,#mermaid-svg-ACKLiAbPii6dNeQH .node circle,#mermaid-svg-ACKLiAbPii6dNeQH .node ellipse,#mermaid-svg-ACKLiAbPii6dNeQH .node polygon,#mermaid-svg-ACKLiAbPii6dNeQH .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-svg-ACKLiAbPii6dNeQH .rough-node .label text,#mermaid-svg-ACKLiAbPii6dNeQH .node .label text,#mermaid-svg-ACKLiAbPii6dNeQH .image-shape .label,#mermaid-svg-ACKLiAbPii6dNeQH .icon-shape .label{text-anchor:middle;}#mermaid-svg-ACKLiAbPii6dNeQH .node .katex path{fill:#000;stroke:#000;stroke-width:1px;}#mermaid-svg-ACKLiAbPii6dNeQH .rough-node .label,#mermaid-svg-ACKLiAbPii6dNeQH .node .label,#mermaid-svg-ACKLiAbPii6dNeQH .image-shape .label,#mermaid-svg-ACKLiAbPii6dNeQH .icon-shape .label{text-align:center;}#mermaid-svg-ACKLiAbPii6dNeQH .node.clickable{cursor:pointer;}#mermaid-svg-ACKLiAbPii6dNeQH .root .anchor path{fill:#333333!important;stroke-width:0;stroke:#333333;}#mermaid-svg-ACKLiAbPii6dNeQH .arrowheadPath{fill:#333333;}#mermaid-svg-ACKLiAbPii6dNeQH .edgePath .path{stroke:#333333;stroke-width:2.0px;}#mermaid-svg-ACKLiAbPii6dNeQH .flowchart-link{stroke:#333333;fill:none;}#mermaid-svg-ACKLiAbPii6dNeQH .edgeLabel{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-ACKLiAbPii6dNeQH .edgeLabel p{background-color:rgba(232,232,232, 0.8);}#mermaid-svg-ACKLiAbPii6dNeQH .edgeLabel rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-ACKLiAbPii6dNeQH .labelBkg{background-color:rgba(232, 232, 232, 0.5);}#mermaid-svg-ACKLiAbPii6dNeQH .cluster rect{fill:#ffffde;stroke:#aaaa33;stroke-width:1px;}#mermaid-svg-ACKLiAbPii6dNeQH .cluster text{fill:#333;}#mermaid-svg-ACKLiAbPii6dNeQH .cluster span{color:#333;}#mermaid-svg-ACKLiAbPii6dNeQH 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-ACKLiAbPii6dNeQH .flowchartTitleText{text-anchor:middle;font-size:18px;fill:#333;}#mermaid-svg-ACKLiAbPii6dNeQH rect.text{fill:none;stroke-width:0;}#mermaid-svg-ACKLiAbPii6dNeQH .icon-shape,#mermaid-svg-ACKLiAbPii6dNeQH .image-shape{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-ACKLiAbPii6dNeQH .icon-shape p,#mermaid-svg-ACKLiAbPii6dNeQH .image-shape p{background-color:rgba(232,232,232, 0.8);padding:2px;}#mermaid-svg-ACKLiAbPii6dNeQH .icon-shape .label rect,#mermaid-svg-ACKLiAbPii6dNeQH .image-shape .label rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-ACKLiAbPii6dNeQH .label-icon{display:inline-block;height:1em;overflow:visible;vertical-align:-0.125em;}#mermaid-svg-ACKLiAbPii6dNeQH .node .label-icon path{fill:currentColor;stroke:revert;stroke-width:revert;}#mermaid-svg-ACKLiAbPii6dNeQH :root{&#8211;mermaid-font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;}<\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>\u805a\u7c07\u7d22\u5f15\u6811 id<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>\u4e8c\u7ea7\u7d22\u5f15\u6811 name<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"edgeLabel\"><\/p>\n<p>\u56de\u8868<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"edgeLabel\"><\/p>\n<p>\u56de\u8868<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>\u53f6\u5b50: name&#061;\u5f20\u4e09 \u2192 id&#061;5<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>\u53f6\u5b50: name&#061;\u674e\u56db \u2192 id&#061;8<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>\u53f6\u5b50: id&#061;5 \u2192 \u6574\u884c&#xff08;\u5f20\u4e09,20,\u5317\u4eac&#xff09;<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>\u53f6\u5b50: id&#061;8 \u2192 \u6574\u884c&#xff08;\u674e\u56db,25,\u4e0a\u6d77&#xff09;<\/p>\n<p><\/span><\/p>\n<p>\u4f18\u5316\u63d0\u793a&#xff1a;SELECT * \u51e0\u4e4e\u5fc5\u7136\u89e6\u53d1\u56de\u8868\u3002\u53ea\u67e5\u6240\u9700\u5217&#xff0c;\u4e89\u53d6 \u8986\u76d6\u7d22\u5f15 \u624d\u80fd\u907f\u514d\u56de\u8868\u3002<\/p>\n<h4>3.3 \u8986\u76d6\u7d22\u5f15&#xff08;Covering Index&#xff09;<\/h4>\n<p>\u5f53\u67e5\u8be2\u7684 \u6240\u6709\u5217 \u90fd\u5305\u542b\u5728\u67d0\u4e2a\u4e8c\u7ea7\u7d22\u5f15\u4e2d&#xff0c;\u5f15\u64ce\u76f4\u63a5\u4ece\u7d22\u5f15\u53d6\u6570&#xff0c;\u65e0\u9700\u56de\u8868\u3002\u8fd9\u662f\u9ad8\u6027\u80fd\u67e5\u8be2\u7684\u5173\u952e\u624b\u6bb5\u3002<\/p>\n<p><span class=\"token comment\">&#8212; \u8054\u5408\u7d22\u5f15 (name, age)<\/span><br \/>\n<span class=\"token comment\">&#8212; \u2705 \u8986\u76d6\u7d22\u5f15&#xff1a;\u53ea\u9700 name\u3001age&#xff0c;\u7d22\u5f15\u5df2\u5305\u542b<\/span><br \/>\n<span class=\"token keyword\">SELECT<\/span> name<span class=\"token punctuation\">,<\/span> age <span class=\"token keyword\">FROM<\/span> <span class=\"token keyword\">user<\/span> <span class=\"token keyword\">WHERE<\/span> name <span class=\"token operator\">&#061;<\/span> <span class=\"token string\">&#039;\u5f20\u4e09&#039;<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p><span class=\"token comment\">&#8212; \u274c \u9700\u56de\u8868&#xff1a;address \u4e0d\u5728\u7d22\u5f15\u4e2d<\/span><br \/>\n<span class=\"token keyword\">SELECT<\/span> name<span class=\"token punctuation\">,<\/span> age<span class=\"token punctuation\">,<\/span> address <span class=\"token keyword\">FROM<\/span> <span class=\"token keyword\">user<\/span> <span class=\"token keyword\">WHERE<\/span> name <span class=\"token operator\">&#061;<\/span> <span class=\"token string\">&#039;\u5f20\u4e09&#039;<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<h4>3.4 \u8054\u5408\u7d22\u5f15\u4e0e\u6700\u5de6\u524d\u7f00\u539f\u5219<\/h4>\n<p>\u8054\u5408\u7d22\u5f15 (a, b, c) \u5728 B&#043; \u6811\u4e2d\u6309 a \u2192 b \u2192 c \u4f9d\u6b21\u6392\u5e8f\u3002\u6700\u5de6\u524d\u7f00\u539f\u5219\u6307&#xff1a;\u67e5\u8be2\u5fc5\u987b\u4ece\u7d22\u5f15\u7684 \u6700\u5de6\u5217\u5f00\u59cb\u4e14\u8fde\u7eed&#xff0c;\u624d\u80fd\u6709\u6548\u5229\u7528\u7d22\u5f15\u3002<\/p>\n<table>\n<tr>\u67e5\u8be2\u6761\u4ef6\u662f\u5426\u8d70\u7d22\u5f15\u8bf4\u660e<\/tr>\n<tbody>\n<tr>\n<td>a&#061;1<\/td>\n<td>\u2705<\/td>\n<td>\u7528\u5230 a<\/td>\n<\/tr>\n<tr>\n<td>a&#061;1 AND b&#061;2<\/td>\n<td>\u2705<\/td>\n<td>\u7528\u5230 a,b<\/td>\n<\/tr>\n<tr>\n<td>a&#061;1 AND b&#061;2 AND c&#061;3<\/td>\n<td>\u2705<\/td>\n<td>\u7528\u5230 a,b,c<\/td>\n<\/tr>\n<tr>\n<td>b&#061;2<\/td>\n<td>\u274c<\/td>\n<td>\u7f3a\u5931\u6700\u5de6\u5217 a<\/td>\n<\/tr>\n<tr>\n<td>a&#061;1 AND c&#061;3<\/td>\n<td>\u26a0\ufe0f<\/td>\n<td>\u4ec5\u7528\u5230 a&#xff0c;c \u5931\u6548&#xff08;\u8df3\u8fc7\u4e86 b&#xff09;<\/td>\n<\/tr>\n<tr>\n<td>a&gt;1 AND b&#061;2<\/td>\n<td>\u26a0\ufe0f<\/td>\n<td>a \u8303\u56f4\u540e b \u5931\u6548&#xff08;\u8303\u56f4\u5217\u53f3\u4fa7\u5931\u6548&#xff09;<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>3.5 \u7d22\u5f15\u5931\u6548\u7684\u5178\u578b\u573a\u666f<\/h4>\n<li>\u5bf9\u7d22\u5f15\u5217\u505a\u51fd\u6570\/\u8fd0\u7b97&#xff1a;WHERE YEAR(create_time)&#061;2026 \u2192 \u6539\u4e3a\u8303\u56f4 create_time &gt;&#061; &#039;2026-01-01&#039;\u3002<\/li>\n<li>\u9690\u5f0f\u7c7b\u578b\u8f6c\u6362&#xff1a;\u5217\u662f\u5b57\u7b26\u4e32&#xff0c;\u4f20\u5165\u6570\u5b57 WHERE phone &#061; 13800000000 \u2192 \u89e6\u53d1 CAST&#xff0c;\u7d22\u5f15\u5931\u6548\u3002<\/li>\n<li>\u524d\u5bfc\u6a21\u7cca\u67e5\u8be2&#xff1a;LIKE &#039;%abc&#039; \u5931\u6548&#xff1b;LIKE &#039;abc%&#039; \u53ef\u7528\u3002<\/li>\n<li>OR \u8fde\u63a5\u975e\u7d22\u5f15\u5217&#xff1a;WHERE a&#061;1 OR b&#061;2&#xff0c;\u82e5 b \u65e0\u7d22\u5f15\u5219\u5168\u8868\u626b\u63cf&#xff08;\u53ef\u8003\u8651\u7d22\u5f15\u5408\u5e76\u6216\u6539\u9020&#xff09;\u3002<\/li>\n<li>\u8fdd\u80cc\u6700\u5de6\u524d\u7f00\u3002<\/li>\n<li>\u4f18\u5316\u5668\u8ba4\u4e3a\u5168\u8868\u626b\u63cf\u66f4\u5feb&#xff08;\u6570\u636e\u91cf\u6781\u5c0f\u6216\u9009\u62e9\u6027\u6781\u4f4e&#xff0c;\u5982\u6027\u522b\u5b57\u6bb5&#xff09;\u3002<\/li>\n<h4>3.6 \u7d22\u5f15\u8bbe\u8ba1\u539f\u5219<\/h4>\n<ul>\n<li>\u9ad8\u9009\u62e9\u6027\u5217\u4f18\u5148\u5efa\u7d22\u5f15&#xff08;\u533a\u5206\u5ea6 &#061; \u53bb\u91cd\u503c\/\u603b\u6570&#xff0c;\u8d8a\u63a5\u8fd1 1 \u8d8a\u597d&#xff09;\u3002<\/li>\n<li>\u4f18\u5148\u8986\u76d6\u7d22\u5f15&#xff0c;\u51cf\u5c11\u56de\u8868\u3002<\/li>\n<li>\u63a7\u5236\u5355\u8868\u7d22\u5f15\u6570\u91cf&#xff08;\u5efa\u8bae \u2264 5&#xff09;&#xff0c;\u907f\u514d\u5199\u5165\u65f6\u7ef4\u62a4\u7d22\u5f15\u7684\u989d\u5916\u5f00\u9500\u3002<\/li>\n<li>\u957f\u5b57\u7b26\u4e32\u7528 \u524d\u7f00\u7d22\u5f15 INDEX(name(20))&#xff0c;\u6743\u8861\u533a\u5206\u5ea6\u4e0e\u7a7a\u95f4\u3002<\/li>\n<li>\u5229\u7528 \u7d22\u5f15\u4e0b\u63a8&#xff08;ICP&#xff0c;Index Condition Pushdown&#xff0c;5.6&#043;&#xff09;&#xff1a;\u5728\u5b58\u50a8\u5f15\u64ce\u5c42\u63d0\u524d\u8fc7\u6ee4&#xff0c;\u51cf\u5c11\u56de\u8868\u884c\u6570\u3002<\/li>\n<\/ul>\n<hr \/>\n<h3>\u56db\u3001\u4e8b\u52a1\u4e0e ACID<\/h3>\n<h4>4.1 \u4e8b\u52a1\u56db\u5927\u7279\u6027<\/h4>\n<table>\n<tr>\u7279\u6027\u542b\u4e49InnoDB \u5b9e\u73b0\u673a\u5236<\/tr>\n<tbody>\n<tr>\n<td>\u539f\u5b50\u6027 A<\/td>\n<td>\u4e8b\u52a1\u5185\u64cd\u4f5c\u8981\u4e48\u5168\u6210\u529f&#xff0c;\u8981\u4e48\u5168\u5931\u8d25<\/td>\n<td>Undo Log \u56de\u6eda<\/td>\n<\/tr>\n<tr>\n<td>\u4e00\u81f4\u6027 C<\/td>\n<td>\u6570\u636e\u4ece\u4e00\u4e2a\u4e00\u81f4\u6001\u5230\u53e6\u4e00\u4e2a\u4e00\u81f4\u6001<\/td>\n<td>AID \u5171\u540c\u4fdd\u8bc1<\/td>\n<\/tr>\n<tr>\n<td>\u9694\u79bb\u6027 I<\/td>\n<td>\u5e76\u53d1\u4e8b\u52a1\u4e92\u4e0d\u5e72\u6270<\/td>\n<td>\u9501 &#043; MVCC<\/td>\n<\/tr>\n<tr>\n<td>\u6301\u4e45\u6027 D<\/td>\n<td>\u63d0\u4ea4\u540e\u6570\u636e\u4e0d\u4e22\u5931<\/td>\n<td>Redo Log &#043; \u53cc\u5199\u7f13\u51b2<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>4.2 \u9694\u79bb\u7ea7\u522b\u4e0e\u5e76\u53d1\u95ee\u9898<\/h4>\n<table>\n<tr>\u9694\u79bb\u7ea7\u522b\u810f\u8bfb\u4e0d\u53ef\u91cd\u590d\u8bfb\u5e7b\u8bfb\u6027\u80fd<\/tr>\n<tbody>\n<tr>\n<td>\u8bfb\u672a\u63d0\u4ea4 RU<\/td>\n<td>\u274c \u53ef\u80fd<\/td>\n<td>\u274c \u53ef\u80fd<\/td>\n<td>\u274c \u53ef\u80fd<\/td>\n<td>\u6700\u9ad8<\/td>\n<\/tr>\n<tr>\n<td>\u8bfb\u5df2\u63d0\u4ea4 RC<\/td>\n<td>\u2705 \u907f\u514d<\/td>\n<td>\u274c \u53ef\u80fd<\/td>\n<td>\u274c \u53ef\u80fd<\/td>\n<td>\u9ad8<\/td>\n<\/tr>\n<tr>\n<td>\u53ef\u91cd\u590d\u8bfb RR&#xff08;\u9ed8\u8ba4&#xff09;<\/td>\n<td>\u2705<\/td>\n<td>\u2705<\/td>\n<td>\u26a0\ufe0f \u57fa\u672c\u907f\u514d*<\/td>\n<td>\u4e2d<\/td>\n<\/tr>\n<tr>\n<td>\u4e32\u884c\u5316 Serializable<\/td>\n<td>\u2705<\/td>\n<td>\u2705<\/td>\n<td>\u2705<\/td>\n<td>\u6700\u4f4e<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>*MySQL \u5728 \u53ef\u91cd\u590d\u8bfb&#xff08;RR&#xff09; \u4e0b&#xff0c;\u901a\u8fc7 MVCC &#043; Next-Key Lock&#xff08;\u4e34\u952e\u9501&#xff09; \u57fa\u672c\u89e3\u51b3\u4e86\u5e7b\u8bfb&#xff0c;\u8fd9\u4e5f\u662f MySQL \u9ed8\u8ba4\u7528 RR \u800c\u975e RC \u7684\u539f\u56e0\u3002<\/p>\n<p>  #mermaid-svg-FW0CnTGW6yywZfcl{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-FW0CnTGW6yywZfcl .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#mermaid-svg-FW0CnTGW6yywZfcl .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#mermaid-svg-FW0CnTGW6yywZfcl .error-icon{fill:#552222;}#mermaid-svg-FW0CnTGW6yywZfcl .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-FW0CnTGW6yywZfcl .edge-thickness-normal{stroke-width:1px;}#mermaid-svg-FW0CnTGW6yywZfcl .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-FW0CnTGW6yywZfcl .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-FW0CnTGW6yywZfcl .edge-thickness-invisible{stroke-width:0;fill:none;}#mermaid-svg-FW0CnTGW6yywZfcl .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-FW0CnTGW6yywZfcl .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-FW0CnTGW6yywZfcl .marker{fill:#333333;stroke:#333333;}#mermaid-svg-FW0CnTGW6yywZfcl .marker.cross{stroke:#333333;}#mermaid-svg-FW0CnTGW6yywZfcl svg{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-FW0CnTGW6yywZfcl p{margin:0;}#mermaid-svg-FW0CnTGW6yywZfcl .label{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;color:#333;}#mermaid-svg-FW0CnTGW6yywZfcl .cluster-label text{fill:#333;}#mermaid-svg-FW0CnTGW6yywZfcl .cluster-label span{color:#333;}#mermaid-svg-FW0CnTGW6yywZfcl .cluster-label span p{background-color:transparent;}#mermaid-svg-FW0CnTGW6yywZfcl .label text,#mermaid-svg-FW0CnTGW6yywZfcl span{fill:#333;color:#333;}#mermaid-svg-FW0CnTGW6yywZfcl .node rect,#mermaid-svg-FW0CnTGW6yywZfcl .node circle,#mermaid-svg-FW0CnTGW6yywZfcl .node ellipse,#mermaid-svg-FW0CnTGW6yywZfcl .node polygon,#mermaid-svg-FW0CnTGW6yywZfcl .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-svg-FW0CnTGW6yywZfcl .rough-node .label text,#mermaid-svg-FW0CnTGW6yywZfcl .node .label text,#mermaid-svg-FW0CnTGW6yywZfcl .image-shape .label,#mermaid-svg-FW0CnTGW6yywZfcl .icon-shape .label{text-anchor:middle;}#mermaid-svg-FW0CnTGW6yywZfcl .node .katex path{fill:#000;stroke:#000;stroke-width:1px;}#mermaid-svg-FW0CnTGW6yywZfcl .rough-node .label,#mermaid-svg-FW0CnTGW6yywZfcl .node .label,#mermaid-svg-FW0CnTGW6yywZfcl .image-shape .label,#mermaid-svg-FW0CnTGW6yywZfcl .icon-shape .label{text-align:center;}#mermaid-svg-FW0CnTGW6yywZfcl .node.clickable{cursor:pointer;}#mermaid-svg-FW0CnTGW6yywZfcl .root .anchor path{fill:#333333!important;stroke-width:0;stroke:#333333;}#mermaid-svg-FW0CnTGW6yywZfcl .arrowheadPath{fill:#333333;}#mermaid-svg-FW0CnTGW6yywZfcl .edgePath .path{stroke:#333333;stroke-width:2.0px;}#mermaid-svg-FW0CnTGW6yywZfcl .flowchart-link{stroke:#333333;fill:none;}#mermaid-svg-FW0CnTGW6yywZfcl .edgeLabel{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-FW0CnTGW6yywZfcl .edgeLabel p{background-color:rgba(232,232,232, 0.8);}#mermaid-svg-FW0CnTGW6yywZfcl .edgeLabel rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-FW0CnTGW6yywZfcl .labelBkg{background-color:rgba(232, 232, 232, 0.5);}#mermaid-svg-FW0CnTGW6yywZfcl .cluster rect{fill:#ffffde;stroke:#aaaa33;stroke-width:1px;}#mermaid-svg-FW0CnTGW6yywZfcl .cluster text{fill:#333;}#mermaid-svg-FW0CnTGW6yywZfcl .cluster span{color:#333;}#mermaid-svg-FW0CnTGW6yywZfcl 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-FW0CnTGW6yywZfcl .flowchartTitleText{text-anchor:middle;font-size:18px;fill:#333;}#mermaid-svg-FW0CnTGW6yywZfcl rect.text{fill:none;stroke-width:0;}#mermaid-svg-FW0CnTGW6yywZfcl .icon-shape,#mermaid-svg-FW0CnTGW6yywZfcl .image-shape{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-FW0CnTGW6yywZfcl .icon-shape p,#mermaid-svg-FW0CnTGW6yywZfcl .image-shape p{background-color:rgba(232,232,232, 0.8);padding:2px;}#mermaid-svg-FW0CnTGW6yywZfcl .icon-shape .label rect,#mermaid-svg-FW0CnTGW6yywZfcl .image-shape .label rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-FW0CnTGW6yywZfcl .label-icon{display:inline-block;height:1em;overflow:visible;vertical-align:-0.125em;}#mermaid-svg-FW0CnTGW6yywZfcl .node .label-icon path{fill:currentColor;stroke:revert;stroke-width:revert;}#mermaid-svg-FW0CnTGW6yywZfcl :root{&#8211;mermaid-font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;}<\/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=\"edgeLabel\"><\/span><\/p>\n<p>         <span class=\"edgeLabel\"><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>\u5e76\u53d1\u4e8b\u52a1<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>\u810f\u8bfb: \u8bfb\u5230\u672a\u63d0\u4ea4\u6570\u636e<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>\u4e0d\u53ef\u91cd\u590d\u8bfb: \u540c\u67e5\u8be2\u4e24\u6b21\u7ed3\u679c\u4e0d\u540c&#xff08;\u9488\u5bf9UPDATE\/DELETE&#xff09;<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>\u5e7b\u8bfb: \u540c\u67e5\u8be2\u4e24\u6b21\u884c\u6570\u4e0d\u540c&#xff08;\u9488\u5bf9INSERT&#xff09;<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>\u8bfb\u5df2\u63d0\u4ea4 \u89e3\u51b3\u810f\u8bfb<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>\u53ef\u91cd\u590d\u8bfb \u89e3\u51b3\u4e0d\u53ef\u91cd\u590d\u8bfb<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>\u4e32\u884c\u5316 \u89e3\u51b3\u5e7b\u8bfb<\/p>\n<p><\/span><\/p>\n<hr \/>\n<h3>\u4e94\u3001MVCC \u591a\u7248\u672c\u5e76\u53d1\u63a7\u5236<\/h3>\n<p>MVCC&#xff08;Multi-Version Concurrency Control&#xff09;\u8ba9 \u8bfb\u4e0d\u52a0\u9501\u3001\u8bfb\u5199\u4e0d\u963b\u585e&#xff0c;\u662f InnoDB \u9ad8\u5e76\u53d1\u7684\u57fa\u77f3\u3002<\/p>\n<h4>5.1 \u4e09\u5927\u6838\u5fc3\u7ec4\u4ef6<\/h4>\n<li>\u9690\u85cf\u5b57\u6bb5&#xff1a;DB_TRX_ID&#xff08;\u6700\u8fd1\u4fee\u6539\u4e8b\u52a1 ID&#xff09;\u3001DB_ROLL_PTR&#xff08;\u56de\u6eda\u6307\u9488&#xff0c;\u6307\u5411 Undo Log \u4e2d\u65e7\u7248\u672c&#xff09;\u3002<\/li>\n<li>Undo Log \u7248\u672c\u94fe&#xff1a;\u6bcf\u6b21\u66f4\u65b0\u90fd\u628a\u65e7\u503c\u5199\u5165 Undo Log&#xff0c;\u901a\u8fc7\u6307\u9488\u4e32\u6210\u94fe\u3002<\/li>\n<li>ReadView&#xff08;\u8bfb\u89c6\u56fe&#xff09;&#xff1a;\u4e8b\u52a1\u5f00\u542f\u77ac\u95f4\u7684\u4e00\u81f4\u6027\u5feb\u7167&#xff0c;\u8bb0\u5f55\u5f53\u524d\u6d3b\u8dc3\u4e8b\u52a1 ID \u5217\u8868\u3002<\/li>\n<h4>5.2 \u7248\u672c\u94fe\u53ef\u89c1\u6027\u5224\u65ad\u6d41\u7a0b<\/h4>\n<p>  #mermaid-svg-ef3G9YILiYpVrCZ7{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-ef3G9YILiYpVrCZ7 .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#mermaid-svg-ef3G9YILiYpVrCZ7 .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#mermaid-svg-ef3G9YILiYpVrCZ7 .error-icon{fill:#552222;}#mermaid-svg-ef3G9YILiYpVrCZ7 .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-ef3G9YILiYpVrCZ7 .edge-thickness-normal{stroke-width:1px;}#mermaid-svg-ef3G9YILiYpVrCZ7 .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-ef3G9YILiYpVrCZ7 .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-ef3G9YILiYpVrCZ7 .edge-thickness-invisible{stroke-width:0;fill:none;}#mermaid-svg-ef3G9YILiYpVrCZ7 .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-ef3G9YILiYpVrCZ7 .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-ef3G9YILiYpVrCZ7 .marker{fill:#333333;stroke:#333333;}#mermaid-svg-ef3G9YILiYpVrCZ7 .marker.cross{stroke:#333333;}#mermaid-svg-ef3G9YILiYpVrCZ7 svg{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-ef3G9YILiYpVrCZ7 p{margin:0;}#mermaid-svg-ef3G9YILiYpVrCZ7 .label{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;color:#333;}#mermaid-svg-ef3G9YILiYpVrCZ7 .cluster-label text{fill:#333;}#mermaid-svg-ef3G9YILiYpVrCZ7 .cluster-label span{color:#333;}#mermaid-svg-ef3G9YILiYpVrCZ7 .cluster-label span p{background-color:transparent;}#mermaid-svg-ef3G9YILiYpVrCZ7 .label text,#mermaid-svg-ef3G9YILiYpVrCZ7 span{fill:#333;color:#333;}#mermaid-svg-ef3G9YILiYpVrCZ7 .node rect,#mermaid-svg-ef3G9YILiYpVrCZ7 .node circle,#mermaid-svg-ef3G9YILiYpVrCZ7 .node ellipse,#mermaid-svg-ef3G9YILiYpVrCZ7 .node polygon,#mermaid-svg-ef3G9YILiYpVrCZ7 .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-svg-ef3G9YILiYpVrCZ7 .rough-node .label text,#mermaid-svg-ef3G9YILiYpVrCZ7 .node .label text,#mermaid-svg-ef3G9YILiYpVrCZ7 .image-shape .label,#mermaid-svg-ef3G9YILiYpVrCZ7 .icon-shape .label{text-anchor:middle;}#mermaid-svg-ef3G9YILiYpVrCZ7 .node .katex path{fill:#000;stroke:#000;stroke-width:1px;}#mermaid-svg-ef3G9YILiYpVrCZ7 .rough-node .label,#mermaid-svg-ef3G9YILiYpVrCZ7 .node .label,#mermaid-svg-ef3G9YILiYpVrCZ7 .image-shape .label,#mermaid-svg-ef3G9YILiYpVrCZ7 .icon-shape .label{text-align:center;}#mermaid-svg-ef3G9YILiYpVrCZ7 .node.clickable{cursor:pointer;}#mermaid-svg-ef3G9YILiYpVrCZ7 .root .anchor path{fill:#333333!important;stroke-width:0;stroke:#333333;}#mermaid-svg-ef3G9YILiYpVrCZ7 .arrowheadPath{fill:#333333;}#mermaid-svg-ef3G9YILiYpVrCZ7 .edgePath .path{stroke:#333333;stroke-width:2.0px;}#mermaid-svg-ef3G9YILiYpVrCZ7 .flowchart-link{stroke:#333333;fill:none;}#mermaid-svg-ef3G9YILiYpVrCZ7 .edgeLabel{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-ef3G9YILiYpVrCZ7 .edgeLabel p{background-color:rgba(232,232,232, 0.8);}#mermaid-svg-ef3G9YILiYpVrCZ7 .edgeLabel rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-ef3G9YILiYpVrCZ7 .labelBkg{background-color:rgba(232, 232, 232, 0.5);}#mermaid-svg-ef3G9YILiYpVrCZ7 .cluster rect{fill:#ffffde;stroke:#aaaa33;stroke-width:1px;}#mermaid-svg-ef3G9YILiYpVrCZ7 .cluster text{fill:#333;}#mermaid-svg-ef3G9YILiYpVrCZ7 .cluster span{color:#333;}#mermaid-svg-ef3G9YILiYpVrCZ7 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-ef3G9YILiYpVrCZ7 .flowchartTitleText{text-anchor:middle;font-size:18px;fill:#333;}#mermaid-svg-ef3G9YILiYpVrCZ7 rect.text{fill:none;stroke-width:0;}#mermaid-svg-ef3G9YILiYpVrCZ7 .icon-shape,#mermaid-svg-ef3G9YILiYpVrCZ7 .image-shape{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-ef3G9YILiYpVrCZ7 .icon-shape p,#mermaid-svg-ef3G9YILiYpVrCZ7 .image-shape p{background-color:rgba(232,232,232, 0.8);padding:2px;}#mermaid-svg-ef3G9YILiYpVrCZ7 .icon-shape .label rect,#mermaid-svg-ef3G9YILiYpVrCZ7 .image-shape .label rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-ef3G9YILiYpVrCZ7 .label-icon{display:inline-block;height:1em;overflow:visible;vertical-align:-0.125em;}#mermaid-svg-ef3G9YILiYpVrCZ7 .node .label-icon path{fill:currentColor;stroke:revert;stroke-width:revert;}#mermaid-svg-ef3G9YILiYpVrCZ7 :root{&#8211;mermaid-font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;}<\/p>\n<p>         <span class=\"edgeLabel\"><\/span><\/p>\n<p>         <span class=\"edgeLabel\"><\/p>\n<p>\u662f \u81ea\u5df1\u6539\u7684<\/p>\n<p><\/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 \u5df2\u63d0\u4ea4<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"edgeLabel\"><\/p>\n<p>\u5426<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"edgeLabel\"><\/p>\n<p>\u4e0d\u5728 \u5df2\u63d0\u4ea4<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"edgeLabel\"><\/p>\n<p>\u5728 \u672a\u63d0\u4ea4<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"edgeLabel\"><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>\u5f00\u59cb\u67e5\u8be2 \u53d6\u4e00\u884c\u6570\u636e<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>DB_TRX_ID &#061;&#061; \u5f53\u524d\u4e8b\u52a1ID?<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>\u53ef\u89c1<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>DB_TRX_ID \u5c0f\u4e8e\u6d3b\u8dc3\u6700\u5c0f\u4e8b\u52a1ID?<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>DB_TRX_ID \u5728\u6d3b\u8dc3\u5217\u8868?<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>\u6cbf DB_ROLL_PTR \u627e\u4e0a\u4e00\u7248\u672c<\/p>\n<p><\/span><\/p>\n<ul>\n<li>RC&#xff1a;\u6bcf\u6b21 SELECT \u90fd\u751f\u6210\u65b0 ReadView \u2192 \u80fd\u8bfb\u5230\u522b\u7684\u4e8b\u52a1\u5df2\u63d0\u4ea4\u7684\u6700\u65b0\u503c&#xff08;\u4e0d\u53ef\u91cd\u590d\u8bfb&#xff09;\u3002<\/li>\n<li>RR&#xff1a;\u4e8b\u52a1\u5185 \u7b2c\u4e00\u6b21 SELECT \u751f\u6210 ReadView&#xff0c;\u540e\u7eed\u590d\u7528 \u2192 \u6574\u4e8b\u52a1\u770b\u5230\u4e00\u81f4\u5feb\u7167&#xff08;\u53ef\u91cd\u590d\u8bfb&#xff09;\u3002<\/li>\n<\/ul>\n<hr \/>\n<h3>\u516d\u3001\u9501\u673a\u5236<\/h3>\n<h4>6.1 \u9501\u5206\u7c7b\u603b\u89c8<\/h4>\n<p>  #mermaid-svg-gd5AymEUmlE7PzEx{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-gd5AymEUmlE7PzEx .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#mermaid-svg-gd5AymEUmlE7PzEx .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#mermaid-svg-gd5AymEUmlE7PzEx .error-icon{fill:#552222;}#mermaid-svg-gd5AymEUmlE7PzEx .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-gd5AymEUmlE7PzEx .edge-thickness-normal{stroke-width:1px;}#mermaid-svg-gd5AymEUmlE7PzEx .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-gd5AymEUmlE7PzEx .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-gd5AymEUmlE7PzEx .edge-thickness-invisible{stroke-width:0;fill:none;}#mermaid-svg-gd5AymEUmlE7PzEx .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-gd5AymEUmlE7PzEx .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-gd5AymEUmlE7PzEx .marker{fill:#333333;stroke:#333333;}#mermaid-svg-gd5AymEUmlE7PzEx .marker.cross{stroke:#333333;}#mermaid-svg-gd5AymEUmlE7PzEx svg{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-gd5AymEUmlE7PzEx p{margin:0;}#mermaid-svg-gd5AymEUmlE7PzEx .label{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;color:#333;}#mermaid-svg-gd5AymEUmlE7PzEx .cluster-label text{fill:#333;}#mermaid-svg-gd5AymEUmlE7PzEx .cluster-label span{color:#333;}#mermaid-svg-gd5AymEUmlE7PzEx .cluster-label span p{background-color:transparent;}#mermaid-svg-gd5AymEUmlE7PzEx .label text,#mermaid-svg-gd5AymEUmlE7PzEx span{fill:#333;color:#333;}#mermaid-svg-gd5AymEUmlE7PzEx .node rect,#mermaid-svg-gd5AymEUmlE7PzEx .node circle,#mermaid-svg-gd5AymEUmlE7PzEx .node ellipse,#mermaid-svg-gd5AymEUmlE7PzEx .node polygon,#mermaid-svg-gd5AymEUmlE7PzEx .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-svg-gd5AymEUmlE7PzEx .rough-node .label text,#mermaid-svg-gd5AymEUmlE7PzEx .node .label text,#mermaid-svg-gd5AymEUmlE7PzEx .image-shape .label,#mermaid-svg-gd5AymEUmlE7PzEx .icon-shape .label{text-anchor:middle;}#mermaid-svg-gd5AymEUmlE7PzEx .node .katex path{fill:#000;stroke:#000;stroke-width:1px;}#mermaid-svg-gd5AymEUmlE7PzEx .rough-node .label,#mermaid-svg-gd5AymEUmlE7PzEx .node .label,#mermaid-svg-gd5AymEUmlE7PzEx .image-shape .label,#mermaid-svg-gd5AymEUmlE7PzEx .icon-shape .label{text-align:center;}#mermaid-svg-gd5AymEUmlE7PzEx .node.clickable{cursor:pointer;}#mermaid-svg-gd5AymEUmlE7PzEx .root .anchor path{fill:#333333!important;stroke-width:0;stroke:#333333;}#mermaid-svg-gd5AymEUmlE7PzEx .arrowheadPath{fill:#333333;}#mermaid-svg-gd5AymEUmlE7PzEx .edgePath .path{stroke:#333333;stroke-width:2.0px;}#mermaid-svg-gd5AymEUmlE7PzEx .flowchart-link{stroke:#333333;fill:none;}#mermaid-svg-gd5AymEUmlE7PzEx .edgeLabel{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-gd5AymEUmlE7PzEx .edgeLabel p{background-color:rgba(232,232,232, 0.8);}#mermaid-svg-gd5AymEUmlE7PzEx .edgeLabel rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-gd5AymEUmlE7PzEx .labelBkg{background-color:rgba(232, 232, 232, 0.5);}#mermaid-svg-gd5AymEUmlE7PzEx .cluster rect{fill:#ffffde;stroke:#aaaa33;stroke-width:1px;}#mermaid-svg-gd5AymEUmlE7PzEx .cluster text{fill:#333;}#mermaid-svg-gd5AymEUmlE7PzEx .cluster span{color:#333;}#mermaid-svg-gd5AymEUmlE7PzEx 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-gd5AymEUmlE7PzEx .flowchartTitleText{text-anchor:middle;font-size:18px;fill:#333;}#mermaid-svg-gd5AymEUmlE7PzEx rect.text{fill:none;stroke-width:0;}#mermaid-svg-gd5AymEUmlE7PzEx .icon-shape,#mermaid-svg-gd5AymEUmlE7PzEx .image-shape{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-gd5AymEUmlE7PzEx .icon-shape p,#mermaid-svg-gd5AymEUmlE7PzEx .image-shape p{background-color:rgba(232,232,232, 0.8);padding:2px;}#mermaid-svg-gd5AymEUmlE7PzEx .icon-shape .label rect,#mermaid-svg-gd5AymEUmlE7PzEx .image-shape .label rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-gd5AymEUmlE7PzEx .label-icon{display:inline-block;height:1em;overflow:visible;vertical-align:-0.125em;}#mermaid-svg-gd5AymEUmlE7PzEx .node .label-icon path{fill:currentColor;stroke:revert;stroke-width:revert;}#mermaid-svg-gd5AymEUmlE7PzEx :root{&#8211;mermaid-font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;}<\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>\u884c\u9501\u7c7b\u578b<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>\u6309\u7c92\u5ea6<\/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=\"nodeLabel\"><\/p>\n<p>\u9501\u6a21\u5f0f<\/p>\n<p><\/span><\/p>\n<p>           <span class=\"nodeLabel\"><\/p>\n<p>\u5171\u4eab\u9501 S Lock<\/p>\n<p><\/span><\/p>\n<p>           <span class=\"nodeLabel\"><\/p>\n<p>\u6392\u4ed6\u9501 X Lock<\/p>\n<p><\/span><\/p>\n<p>           <span class=\"nodeLabel\"><\/p>\n<p>\u610f\u5411\u5171\u4eab IS<\/p>\n<p><\/span><\/p>\n<p>           <span class=\"nodeLabel\"><\/p>\n<p>\u610f\u5411\u6392\u4ed6 IX<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>\u8868\u7ea7\u9501MyISAM\/\u610f\u5411\u9501<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>\u884c\u7ea7\u9501InnoDB \u9ed8\u8ba4<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>Record Lock \u8bb0\u5f55\u9501<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>Gap Lock \u95f4\u9699\u9501<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>Next-Key Lock \u4e34\u952e\u9501\u8bb0\u5f55\u9501&#043;\u95f4\u9699\u9501<\/p>\n<p><\/span><\/p>\n<h4>6.2 \u9501\u517c\u5bb9\u77e9\u9635<\/h4>\n<table>\n<tr>\u8bf7\u6c42 \\\\ \u6301\u6709ISIXSX<\/tr>\n<tbody>\n<tr>\n<td>IS<\/td>\n<td>\u2705<\/td>\n<td>\u2705<\/td>\n<td>\u2705<\/td>\n<td>\u274c<\/td>\n<\/tr>\n<tr>\n<td>IX<\/td>\n<td>\u2705<\/td>\n<td>\u2705<\/td>\n<td>\u274c<\/td>\n<td>\u274c<\/td>\n<\/tr>\n<tr>\n<td>S<\/td>\n<td>\u2705<\/td>\n<td>\u274c<\/td>\n<td>\u2705<\/td>\n<td>\u274c<\/td>\n<\/tr>\n<tr>\n<td>X<\/td>\n<td>\u274c<\/td>\n<td>\u274c<\/td>\n<td>\u274c<\/td>\n<td>\u274c<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<ul>\n<li>\u610f\u5411\u9501&#xff08;IS\/IX&#xff09; \u662f\u8868\u7ea7&#034;\u58f0\u660e&#034;&#xff0c;\u7528\u4e8e\u5feb\u901f\u5224\u65ad\u80fd\u5426\u52a0\u8868\u9501&#xff0c;\u907f\u514d\u9010\u884c\u626b\u63cf\u3002<\/li>\n<li>Next-Key Lock \u662f InnoDB RR \u7ea7\u522b\u9ed8\u8ba4\u884c\u9501\u7b97\u6cd5&#xff0c;\u9501\u5b9a\u8bb0\u5f55\u672c\u8eab &#043; \u5176\u524d\u95f4\u9699&#xff0c;\u4ece\u800c \u9632\u6b62\u5e7b\u8bfb\u3002<\/li>\n<\/ul>\n<h4>6.3 \u6b7b\u9501\u4e0e\u89c4\u907f<\/h4>\n<p>\u6b7b\u9501\u4ea7\u751f\u6761\u4ef6&#xff1a;\u4e92\u65a5\u3001\u6301\u6709\u5e76\u7b49\u5f85\u3001\u4e0d\u53ef\u5265\u593a\u3001\u5faa\u73af\u7b49\u5f85\u3002<\/p>\n<p>  #mermaid-svg-XXq1Q8Gfcec9fhzT{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-XXq1Q8Gfcec9fhzT .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#mermaid-svg-XXq1Q8Gfcec9fhzT .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#mermaid-svg-XXq1Q8Gfcec9fhzT .error-icon{fill:#552222;}#mermaid-svg-XXq1Q8Gfcec9fhzT .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-XXq1Q8Gfcec9fhzT .edge-thickness-normal{stroke-width:1px;}#mermaid-svg-XXq1Q8Gfcec9fhzT .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-XXq1Q8Gfcec9fhzT .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-XXq1Q8Gfcec9fhzT .edge-thickness-invisible{stroke-width:0;fill:none;}#mermaid-svg-XXq1Q8Gfcec9fhzT .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-XXq1Q8Gfcec9fhzT .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-XXq1Q8Gfcec9fhzT .marker{fill:#333333;stroke:#333333;}#mermaid-svg-XXq1Q8Gfcec9fhzT .marker.cross{stroke:#333333;}#mermaid-svg-XXq1Q8Gfcec9fhzT svg{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-XXq1Q8Gfcec9fhzT p{margin:0;}#mermaid-svg-XXq1Q8Gfcec9fhzT .label{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;color:#333;}#mermaid-svg-XXq1Q8Gfcec9fhzT .cluster-label text{fill:#333;}#mermaid-svg-XXq1Q8Gfcec9fhzT .cluster-label span{color:#333;}#mermaid-svg-XXq1Q8Gfcec9fhzT .cluster-label span p{background-color:transparent;}#mermaid-svg-XXq1Q8Gfcec9fhzT .label text,#mermaid-svg-XXq1Q8Gfcec9fhzT span{fill:#333;color:#333;}#mermaid-svg-XXq1Q8Gfcec9fhzT .node rect,#mermaid-svg-XXq1Q8Gfcec9fhzT .node circle,#mermaid-svg-XXq1Q8Gfcec9fhzT .node ellipse,#mermaid-svg-XXq1Q8Gfcec9fhzT .node polygon,#mermaid-svg-XXq1Q8Gfcec9fhzT .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-svg-XXq1Q8Gfcec9fhzT .rough-node .label text,#mermaid-svg-XXq1Q8Gfcec9fhzT .node .label text,#mermaid-svg-XXq1Q8Gfcec9fhzT .image-shape .label,#mermaid-svg-XXq1Q8Gfcec9fhzT .icon-shape .label{text-anchor:middle;}#mermaid-svg-XXq1Q8Gfcec9fhzT .node .katex path{fill:#000;stroke:#000;stroke-width:1px;}#mermaid-svg-XXq1Q8Gfcec9fhzT .rough-node .label,#mermaid-svg-XXq1Q8Gfcec9fhzT .node .label,#mermaid-svg-XXq1Q8Gfcec9fhzT .image-shape .label,#mermaid-svg-XXq1Q8Gfcec9fhzT .icon-shape .label{text-align:center;}#mermaid-svg-XXq1Q8Gfcec9fhzT .node.clickable{cursor:pointer;}#mermaid-svg-XXq1Q8Gfcec9fhzT .root .anchor path{fill:#333333!important;stroke-width:0;stroke:#333333;}#mermaid-svg-XXq1Q8Gfcec9fhzT .arrowheadPath{fill:#333333;}#mermaid-svg-XXq1Q8Gfcec9fhzT .edgePath .path{stroke:#333333;stroke-width:2.0px;}#mermaid-svg-XXq1Q8Gfcec9fhzT .flowchart-link{stroke:#333333;fill:none;}#mermaid-svg-XXq1Q8Gfcec9fhzT .edgeLabel{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-XXq1Q8Gfcec9fhzT .edgeLabel p{background-color:rgba(232,232,232, 0.8);}#mermaid-svg-XXq1Q8Gfcec9fhzT .edgeLabel rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-XXq1Q8Gfcec9fhzT .labelBkg{background-color:rgba(232, 232, 232, 0.5);}#mermaid-svg-XXq1Q8Gfcec9fhzT .cluster rect{fill:#ffffde;stroke:#aaaa33;stroke-width:1px;}#mermaid-svg-XXq1Q8Gfcec9fhzT .cluster text{fill:#333;}#mermaid-svg-XXq1Q8Gfcec9fhzT .cluster span{color:#333;}#mermaid-svg-XXq1Q8Gfcec9fhzT 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-XXq1Q8Gfcec9fhzT .flowchartTitleText{text-anchor:middle;font-size:18px;fill:#333;}#mermaid-svg-XXq1Q8Gfcec9fhzT rect.text{fill:none;stroke-width:0;}#mermaid-svg-XXq1Q8Gfcec9fhzT .icon-shape,#mermaid-svg-XXq1Q8Gfcec9fhzT .image-shape{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-XXq1Q8Gfcec9fhzT .icon-shape p,#mermaid-svg-XXq1Q8Gfcec9fhzT .image-shape p{background-color:rgba(232,232,232, 0.8);padding:2px;}#mermaid-svg-XXq1Q8Gfcec9fhzT .icon-shape .label rect,#mermaid-svg-XXq1Q8Gfcec9fhzT .image-shape .label rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-XXq1Q8Gfcec9fhzT .label-icon{display:inline-block;height:1em;overflow:visible;vertical-align:-0.125em;}#mermaid-svg-XXq1Q8Gfcec9fhzT .node .label-icon path{fill:currentColor;stroke:revert;stroke-width:revert;}#mermaid-svg-XXq1Q8Gfcec9fhzT :root{&#8211;mermaid-font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;}<\/p>\n<p>         <span class=\"edgeLabel\"><\/p>\n<p>\u6301\u6709 id&#061;1 \u9501<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"edgeLabel\"><\/p>\n<p>\u6301\u6709 id&#061;2 \u9501<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"edgeLabel\"><\/p>\n<p>\u5faa\u73af\u7b49\u5f85<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"edgeLabel\"><\/p>\n<p>\u5faa\u73af\u7b49\u5f85<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>\u4e8b\u52a1A<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>\u7b49\u5f85 id&#061;2<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>\u4e8b\u52a1B<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>\u7b49\u5f85 id&#061;1<\/p>\n<p><\/span><\/p>\n<p>\u89c4\u907f\u65b9\u6848&#xff1a;<\/p>\n<ul>\n<li>\u7ea6\u5b9a \u7edf\u4e00\u7684\u52a0\u9501\u987a\u5e8f&#xff08;\u5982\u6c38\u8fdc\u5148\u9501 id \u5c0f\u7684\u8bb0\u5f55&#xff09;\u3002<\/li>\n<li>\u63a7\u5236\u4e8b\u52a1\u7c92\u5ea6&#xff0c;\u7f29\u77ed\u6301\u9501\u65f6\u95f4\u3002<\/li>\n<li>\u964d\u4f4e\u9694\u79bb\u7ea7\u522b\u5230 RC&#xff08;RC \u4e0b\u4e0d\u52a0 Gap Lock&#xff0c;\u6b7b\u9501\u6982\u7387\u5927\u964d&#xff0c;\u4f46\u9700\u4e1a\u52a1\u5bb9\u5fcd\u4e0d\u53ef\u91cd\u590d\u8bfb&#xff09;\u3002<\/li>\n<li>\u8bbe\u7f6e innodb_lock_wait_timeout&#xff0c;\u8d85\u65f6\u81ea\u52a8\u56de\u6eda\u3002<\/li>\n<li>\u6b7b\u9501\u68c0\u6d4b innodb_deadlock_detect&#061;ON&#xff08;\u9ed8\u8ba4\u5f00&#xff09;&#xff0c;\u68c0\u6d4b\u5230\u540e\u56de\u6eda\u4ee3\u4ef7\u5c0f\u7684\u4e8b\u52a1\u3002<\/li>\n<\/ul>\n<hr \/>\n<h3>\u4e03\u3001\u65e5\u5fd7\u7cfb\u7edf<\/h3>\n<p>InnoDB \u6709\u4e09\u5927\u65e5\u5fd7&#xff0c;\u804c\u8d23\u4e25\u683c\u5206\u79bb&#xff1a;<\/p>\n<table>\n<tr>\u65e5\u5fd7\u6240\u5c5e\u5c42\u5199\u65b9\u5f0f\u6838\u5fc3\u4f5c\u7528<\/tr>\n<tbody>\n<tr>\n<td>Redo Log<\/td>\n<td>InnoDB \u5f15\u64ce<\/td>\n<td>\u5faa\u73af\u3001\u987a\u5e8f\u5199<\/td>\n<td>\u5d29\u6e83\u6062\u590d&#xff0c;\u4fdd\u8bc1\u6301\u4e45\u6027<\/td>\n<\/tr>\n<tr>\n<td>Undo Log<\/td>\n<td>InnoDB \u5f15\u64ce<\/td>\n<td>\u968f\u673a\u5199<\/td>\n<td>\u56de\u6eda\u3001MVCC \u7248\u672c\u94fe<\/td>\n<\/tr>\n<tr>\n<td>Binlog<\/td>\n<td>Server \u5c42<\/td>\n<td>\u8ffd\u52a0\u3001\u987a\u5e8f\u5199<\/td>\n<td>\u4e3b\u4ece\u590d\u5236\u3001\u65f6\u95f4\u70b9\u6062\u590d<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>7.1 WAL \u4e0e\u4e24\u9636\u6bb5\u63d0\u4ea4<\/h4>\n<p>\u4e3a\u4fdd\u8bc1 Redo Log \u4e0e Binlog \u903b\u8f91\u4e00\u81f4&#xff0c;MySQL \u91c7\u7528 \u4e24\u9636\u6bb5\u63d0\u4ea4&#xff08;2PC&#xff09;&#xff1a;<\/p>\n<p>     Server\u5c42Binlog<\/p>\n<p>     InnoDB<\/p>\n<p>     \u6267\u884c\u5668<\/p>\n<p>      Server\u5c42Binlog<\/p>\n<p>      InnoDB<\/p>\n<p>      \u6267\u884c\u5668<\/p>\n<p>  #mermaid-svg-nt0JTM4Bv7pgtfIN{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-nt0JTM4Bv7pgtfIN .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#mermaid-svg-nt0JTM4Bv7pgtfIN .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#mermaid-svg-nt0JTM4Bv7pgtfIN .error-icon{fill:#552222;}#mermaid-svg-nt0JTM4Bv7pgtfIN .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-nt0JTM4Bv7pgtfIN .edge-thickness-normal{stroke-width:1px;}#mermaid-svg-nt0JTM4Bv7pgtfIN .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-nt0JTM4Bv7pgtfIN .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-nt0JTM4Bv7pgtfIN .edge-thickness-invisible{stroke-width:0;fill:none;}#mermaid-svg-nt0JTM4Bv7pgtfIN .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-nt0JTM4Bv7pgtfIN .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-nt0JTM4Bv7pgtfIN .marker{fill:#333333;stroke:#333333;}#mermaid-svg-nt0JTM4Bv7pgtfIN .marker.cross{stroke:#333333;}#mermaid-svg-nt0JTM4Bv7pgtfIN svg{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-nt0JTM4Bv7pgtfIN p{margin:0;}#mermaid-svg-nt0JTM4Bv7pgtfIN .actor{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:#ECECFF;}#mermaid-svg-nt0JTM4Bv7pgtfIN text.actor&gt;tspan{fill:black;stroke:none;}#mermaid-svg-nt0JTM4Bv7pgtfIN .actor-line{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);}#mermaid-svg-nt0JTM4Bv7pgtfIN .innerArc{stroke-width:1.5;stroke-dasharray:none;}#mermaid-svg-nt0JTM4Bv7pgtfIN .messageLine0{stroke-width:1.5;stroke-dasharray:none;stroke:#333;}#mermaid-svg-nt0JTM4Bv7pgtfIN .messageLine1{stroke-width:1.5;stroke-dasharray:2,2;stroke:#333;}#mermaid-svg-nt0JTM4Bv7pgtfIN #arrowhead path{fill:#333;stroke:#333;}#mermaid-svg-nt0JTM4Bv7pgtfIN .sequenceNumber{fill:white;}#mermaid-svg-nt0JTM4Bv7pgtfIN #sequencenumber{fill:#333;}#mermaid-svg-nt0JTM4Bv7pgtfIN #crosshead path{fill:#333;stroke:#333;}#mermaid-svg-nt0JTM4Bv7pgtfIN .messageText{fill:#333;stroke:none;}#mermaid-svg-nt0JTM4Bv7pgtfIN .labelBox{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:#ECECFF;}#mermaid-svg-nt0JTM4Bv7pgtfIN .labelText,#mermaid-svg-nt0JTM4Bv7pgtfIN .labelText&gt;tspan{fill:black;stroke:none;}#mermaid-svg-nt0JTM4Bv7pgtfIN .loopText,#mermaid-svg-nt0JTM4Bv7pgtfIN .loopText&gt;tspan{fill:black;stroke:none;}#mermaid-svg-nt0JTM4Bv7pgtfIN .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-nt0JTM4Bv7pgtfIN .note{stroke:#aaaa33;fill:#fff5ad;}#mermaid-svg-nt0JTM4Bv7pgtfIN .noteText,#mermaid-svg-nt0JTM4Bv7pgtfIN .noteText&gt;tspan{fill:black;stroke:none;}#mermaid-svg-nt0JTM4Bv7pgtfIN .activation0{fill:#f4f4f4;stroke:#666;}#mermaid-svg-nt0JTM4Bv7pgtfIN .activation1{fill:#f4f4f4;stroke:#666;}#mermaid-svg-nt0JTM4Bv7pgtfIN .activation2{fill:#f4f4f4;stroke:#666;}#mermaid-svg-nt0JTM4Bv7pgtfIN .actorPopupMenu{position:absolute;}#mermaid-svg-nt0JTM4Bv7pgtfIN .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-nt0JTM4Bv7pgtfIN .actor-man line{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:#ECECFF;}#mermaid-svg-nt0JTM4Bv7pgtfIN .actor-man circle,#mermaid-svg-nt0JTM4Bv7pgtfIN line{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:#ECECFF;stroke-width:2px;}#mermaid-svg-nt0JTM4Bv7pgtfIN :root{&#8211;mermaid-font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;}<\/p>\n<p>     \u5d29\u6e83\u6062\u590d\u65f6:<\/p>\n<p>     \u82e5 Binlog \u5b8c\u6574\u5219\u8865 commit<\/p>\n<p>     \u5426\u5219\u56de\u6eda<\/p>\n<p>   1. \u4fee\u6539\u6570\u636e\u5199\u5165 Buffer Pool<\/p>\n<p>   2. \u5199 Redo Log(prepare \u72b6\u6001)<\/p>\n<p>   prepare \u5b8c\u6210<\/p>\n<p>   3. \u5199 Binlog<\/p>\n<p>   Binlog \u5b8c\u6210<\/p>\n<p>   4. \u63d0\u4ea4 Redo Log(commit \u72b6\u6001)<\/p>\n<p>\u5d29\u6e83\u6062\u590d\u5224\u5b9a\u89c4\u5219&#xff1a;<\/p>\n<ul>\n<li>Redo Log \u5904\u4e8e prepare&#xff0c;\u4e14 Binlog \u5b8c\u6574 \u2192 \u63d0\u4ea4&#xff08;\u4fdd\u8bc1\u4e3b\u4ece\u4e00\u81f4&#xff09;\u3002<\/li>\n<li>Redo Log \u5904\u4e8e prepare&#xff0c;\u4f46 Binlog \u7f3a\u5931 \u2192 \u56de\u6eda\u3002<\/li>\n<\/ul>\n<hr \/>\n<h3>\u516b\u3001SQL \u4f18\u5316\u4e0e\u6162\u67e5\u8be2<\/h3>\n<h4>8.1 \u6162\u67e5\u8be2\u5b9a\u4f4d\u4e09\u6b65<\/h4>\n<p>  #mermaid-svg-fE2NRVe0Z4ppmpuD{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-fE2NRVe0Z4ppmpuD .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#mermaid-svg-fE2NRVe0Z4ppmpuD .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#mermaid-svg-fE2NRVe0Z4ppmpuD .error-icon{fill:#552222;}#mermaid-svg-fE2NRVe0Z4ppmpuD .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-fE2NRVe0Z4ppmpuD .edge-thickness-normal{stroke-width:1px;}#mermaid-svg-fE2NRVe0Z4ppmpuD .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-fE2NRVe0Z4ppmpuD .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-fE2NRVe0Z4ppmpuD .edge-thickness-invisible{stroke-width:0;fill:none;}#mermaid-svg-fE2NRVe0Z4ppmpuD .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-fE2NRVe0Z4ppmpuD .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-fE2NRVe0Z4ppmpuD .marker{fill:#333333;stroke:#333333;}#mermaid-svg-fE2NRVe0Z4ppmpuD .marker.cross{stroke:#333333;}#mermaid-svg-fE2NRVe0Z4ppmpuD svg{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-fE2NRVe0Z4ppmpuD p{margin:0;}#mermaid-svg-fE2NRVe0Z4ppmpuD .label{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;color:#333;}#mermaid-svg-fE2NRVe0Z4ppmpuD .cluster-label text{fill:#333;}#mermaid-svg-fE2NRVe0Z4ppmpuD .cluster-label span{color:#333;}#mermaid-svg-fE2NRVe0Z4ppmpuD .cluster-label span p{background-color:transparent;}#mermaid-svg-fE2NRVe0Z4ppmpuD .label text,#mermaid-svg-fE2NRVe0Z4ppmpuD span{fill:#333;color:#333;}#mermaid-svg-fE2NRVe0Z4ppmpuD .node rect,#mermaid-svg-fE2NRVe0Z4ppmpuD .node circle,#mermaid-svg-fE2NRVe0Z4ppmpuD .node ellipse,#mermaid-svg-fE2NRVe0Z4ppmpuD .node polygon,#mermaid-svg-fE2NRVe0Z4ppmpuD .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-svg-fE2NRVe0Z4ppmpuD .rough-node .label text,#mermaid-svg-fE2NRVe0Z4ppmpuD .node .label text,#mermaid-svg-fE2NRVe0Z4ppmpuD .image-shape .label,#mermaid-svg-fE2NRVe0Z4ppmpuD .icon-shape .label{text-anchor:middle;}#mermaid-svg-fE2NRVe0Z4ppmpuD .node .katex path{fill:#000;stroke:#000;stroke-width:1px;}#mermaid-svg-fE2NRVe0Z4ppmpuD .rough-node .label,#mermaid-svg-fE2NRVe0Z4ppmpuD .node .label,#mermaid-svg-fE2NRVe0Z4ppmpuD .image-shape .label,#mermaid-svg-fE2NRVe0Z4ppmpuD .icon-shape .label{text-align:center;}#mermaid-svg-fE2NRVe0Z4ppmpuD .node.clickable{cursor:pointer;}#mermaid-svg-fE2NRVe0Z4ppmpuD .root .anchor path{fill:#333333!important;stroke-width:0;stroke:#333333;}#mermaid-svg-fE2NRVe0Z4ppmpuD .arrowheadPath{fill:#333333;}#mermaid-svg-fE2NRVe0Z4ppmpuD .edgePath .path{stroke:#333333;stroke-width:2.0px;}#mermaid-svg-fE2NRVe0Z4ppmpuD .flowchart-link{stroke:#333333;fill:none;}#mermaid-svg-fE2NRVe0Z4ppmpuD .edgeLabel{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-fE2NRVe0Z4ppmpuD .edgeLabel p{background-color:rgba(232,232,232, 0.8);}#mermaid-svg-fE2NRVe0Z4ppmpuD .edgeLabel rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-fE2NRVe0Z4ppmpuD .labelBkg{background-color:rgba(232, 232, 232, 0.5);}#mermaid-svg-fE2NRVe0Z4ppmpuD .cluster rect{fill:#ffffde;stroke:#aaaa33;stroke-width:1px;}#mermaid-svg-fE2NRVe0Z4ppmpuD .cluster text{fill:#333;}#mermaid-svg-fE2NRVe0Z4ppmpuD .cluster span{color:#333;}#mermaid-svg-fE2NRVe0Z4ppmpuD 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-fE2NRVe0Z4ppmpuD .flowchartTitleText{text-anchor:middle;font-size:18px;fill:#333;}#mermaid-svg-fE2NRVe0Z4ppmpuD rect.text{fill:none;stroke-width:0;}#mermaid-svg-fE2NRVe0Z4ppmpuD .icon-shape,#mermaid-svg-fE2NRVe0Z4ppmpuD .image-shape{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-fE2NRVe0Z4ppmpuD .icon-shape p,#mermaid-svg-fE2NRVe0Z4ppmpuD .image-shape p{background-color:rgba(232,232,232, 0.8);padding:2px;}#mermaid-svg-fE2NRVe0Z4ppmpuD .icon-shape .label rect,#mermaid-svg-fE2NRVe0Z4ppmpuD .image-shape .label rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-fE2NRVe0Z4ppmpuD .label-icon{display:inline-block;height:1em;overflow:visible;vertical-align:-0.125em;}#mermaid-svg-fE2NRVe0Z4ppmpuD .node .label-icon path{fill:currentColor;stroke:revert;stroke-width:revert;}#mermaid-svg-fE2NRVe0Z4ppmpuD :root{&#8211;mermaid-font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;}<\/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=\"edgeLabel\"><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>\u5f00\u542f\u6162\u67e5\u8be2\u65e5\u5fd7<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>long_query_time \u9608\u503c\u91c7\u96c6<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>EXPLAIN \u5206\u6790\u6267\u884c\u8ba1\u5212<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>\u5b9a\u4f4d type\/rows\/Extra \u5f02\u5e38<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>\u9488\u5bf9\u6027\u5efa\u7d22\u5f15\/\u6539SQL\/\u8c03\u53c2\u6570<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>\u9a8c\u8bc1 QPS \u4e0e\u54cd\u5e94\u65f6\u95f4<\/p>\n<p><\/span><\/p>\n<p>\u5173\u952e\u914d\u7f6e&#xff1a;<\/p>\n<p><span class=\"token keyword\">SET<\/span> <span class=\"token keyword\">GLOBAL<\/span> slow_query_log <span class=\"token operator\">&#061;<\/span> <span class=\"token string\">&#039;ON&#039;<\/span><span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token keyword\">SET<\/span> <span class=\"token keyword\">GLOBAL<\/span> long_query_time <span class=\"token operator\">&#061;<\/span> <span class=\"token number\">1<\/span><span class=\"token punctuation\">;<\/span>          <span class=\"token comment\">&#8212; \u8d85\u8fc7 1 \u79d2\u8bb0\u4e3a\u6162 SQL<\/span><br \/>\n<span class=\"token keyword\">SET<\/span> <span class=\"token keyword\">GLOBAL<\/span> log_queries_not_using_indexes <span class=\"token operator\">&#061;<\/span> <span class=\"token string\">&#039;ON&#039;<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<h4>8.2 EXPLAIN \u5173\u952e\u5b57\u6bb5\u89e3\u8bfb<\/h4>\n<table>\n<tr>\u5b57\u6bb5\u4f18\u8d28\u4fe1\u53f7\u98ce\u9669\u4fe1\u53f7<\/tr>\n<tbody>\n<tr>\n<td>type<\/td>\n<td>const\/ref\/range<\/td>\n<td>ALL&#xff08;\u5168\u8868\u626b\u63cf&#xff09;\u3001index&#xff08;\u5168\u7d22\u5f15\u626b\u63cf&#xff09;<\/td>\n<\/tr>\n<tr>\n<td>key<\/td>\n<td>\u547d\u4e2d\u9884\u671f\u7d22\u5f15<\/td>\n<td>NULL<\/td>\n<\/tr>\n<tr>\n<td>rows<\/td>\n<td>\u8d8a\u5c0f\u8d8a\u597d<\/td>\n<td>\u63a5\u8fd1\u8868\u603b\u884c\u6570<\/td>\n<\/tr>\n<tr>\n<td>Extra<\/td>\n<td>Using index&#xff08;\u8986\u76d6&#xff09;<\/td>\n<td>Using filesort\u3001Using temporary<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u6267\u884c\u8ba1\u5212\u4ece\u4f18\u5230\u52a3&#xff1a;system &gt; const &gt; eq_ref &gt; ref &gt; range &gt; index &gt; ALL\u3002<\/p>\n<h4>8.3 \u9ad8\u9891\u4f18\u5316\u624b\u6bb5<\/h4>\n<li>\u907f\u514d SELECT *&#xff0c;\u53ea\u53d6\u5fc5\u8981\u5217\u4ee5\u4e89\u53d6\u8986\u76d6\u7d22\u5f15\u3002<\/li>\n<li>\u6df1\u5206\u9875\u4f18\u5316&#xff1a;LIMIT 100000, 20 \u6539\u4e3a\u6e38\u6807\/\u5ef6\u8fdf\u5173\u8054&#xff1a;<span class=\"token keyword\">SELECT<\/span> <span class=\"token operator\">*<\/span> <span class=\"token keyword\">FROM<\/span> orders<br \/>\n<span class=\"token keyword\">WHERE<\/span> id <span class=\"token operator\">&gt;<\/span> <span class=\"token punctuation\">(<\/span><span class=\"token keyword\">SELECT<\/span> id <span class=\"token keyword\">FROM<\/span> orders <span class=\"token keyword\">ORDER<\/span> <span class=\"token keyword\">BY<\/span> id <span class=\"token keyword\">LIMIT<\/span> <span class=\"token number\">100000<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token number\">1<\/span><span class=\"token punctuation\">)<\/span><br \/>\n<span class=\"token keyword\">ORDER<\/span> <span class=\"token keyword\">BY<\/span> id <span class=\"token keyword\">LIMIT<\/span> <span class=\"token number\">20<\/span><span class=\"token punctuation\">;<\/span>\n <\/li>\n<li>\u5927\u4e8b\u52a1\u62c6\u5206&#xff0c;\u907f\u514d\u957f\u4e8b\u52a1\u6301\u9501\u4e0e Undo \u81a8\u80c0\u3002<\/li>\n<li>COUNT \u4f18\u5316&#xff1a;COUNT(*) \u6709\u4e13\u95e8\u4f18\u5316&#xff08;\u4e0d\u53d6\u503c&#xff09;&#xff0c;\u6bd4 COUNT(\u5217) \u5feb&#xff1b;MyISAM \u7684 COUNT(*) \u662f O(1) \u4f46\u65e0WHERE&#xff0c;InnoDB \u9700\u5b9e\u65f6\u6570\u3002<\/li>\n<li>JOIN \u4f18\u5316&#xff1a;\u5c0f\u8868\u9a71\u52a8\u5927\u8868&#xff0c;\u786e\u4fdd\u88ab\u9a71\u52a8\u8868 JOIN \u5217\u6709\u7d22\u5f15\u3002<\/li>\n<hr \/>\n<h3>\u4e5d\u3001\u4e3b\u4ece\u590d\u5236\u4e0e\u9ad8\u53ef\u7528<\/h3>\n<h4>9.1 \u4e3b\u4ece\u590d\u5236\u539f\u7406&#xff08;\u57fa\u4e8e Binlog&#xff09;<\/h4>\n<p>     SQL \u7ebf\u7a0b<\/p>\n<p>     Relay Log<\/p>\n<p>     \u4ece\u5e93 Slave<\/p>\n<p>     Binlog<\/p>\n<p>     \u4e3b\u5e93 Master<\/p>\n<p>      SQL \u7ebf\u7a0b<\/p>\n<p>      Relay Log<\/p>\n<p>      \u4ece\u5e93 Slave<\/p>\n<p>      Binlog<\/p>\n<p>      \u4e3b\u5e93 Master<\/p>\n<p>  #mermaid-svg-aiiSIOwNud1x9cQp{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-aiiSIOwNud1x9cQp .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#mermaid-svg-aiiSIOwNud1x9cQp .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#mermaid-svg-aiiSIOwNud1x9cQp .error-icon{fill:#552222;}#mermaid-svg-aiiSIOwNud1x9cQp .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-aiiSIOwNud1x9cQp .edge-thickness-normal{stroke-width:1px;}#mermaid-svg-aiiSIOwNud1x9cQp .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-aiiSIOwNud1x9cQp .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-aiiSIOwNud1x9cQp .edge-thickness-invisible{stroke-width:0;fill:none;}#mermaid-svg-aiiSIOwNud1x9cQp .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-aiiSIOwNud1x9cQp .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-aiiSIOwNud1x9cQp .marker{fill:#333333;stroke:#333333;}#mermaid-svg-aiiSIOwNud1x9cQp .marker.cross{stroke:#333333;}#mermaid-svg-aiiSIOwNud1x9cQp svg{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-aiiSIOwNud1x9cQp p{margin:0;}#mermaid-svg-aiiSIOwNud1x9cQp .actor{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:#ECECFF;}#mermaid-svg-aiiSIOwNud1x9cQp text.actor&gt;tspan{fill:black;stroke:none;}#mermaid-svg-aiiSIOwNud1x9cQp .actor-line{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);}#mermaid-svg-aiiSIOwNud1x9cQp .innerArc{stroke-width:1.5;stroke-dasharray:none;}#mermaid-svg-aiiSIOwNud1x9cQp .messageLine0{stroke-width:1.5;stroke-dasharray:none;stroke:#333;}#mermaid-svg-aiiSIOwNud1x9cQp .messageLine1{stroke-width:1.5;stroke-dasharray:2,2;stroke:#333;}#mermaid-svg-aiiSIOwNud1x9cQp #arrowhead path{fill:#333;stroke:#333;}#mermaid-svg-aiiSIOwNud1x9cQp .sequenceNumber{fill:white;}#mermaid-svg-aiiSIOwNud1x9cQp #sequencenumber{fill:#333;}#mermaid-svg-aiiSIOwNud1x9cQp #crosshead path{fill:#333;stroke:#333;}#mermaid-svg-aiiSIOwNud1x9cQp .messageText{fill:#333;stroke:none;}#mermaid-svg-aiiSIOwNud1x9cQp .labelBox{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:#ECECFF;}#mermaid-svg-aiiSIOwNud1x9cQp .labelText,#mermaid-svg-aiiSIOwNud1x9cQp .labelText&gt;tspan{fill:black;stroke:none;}#mermaid-svg-aiiSIOwNud1x9cQp .loopText,#mermaid-svg-aiiSIOwNud1x9cQp .loopText&gt;tspan{fill:black;stroke:none;}#mermaid-svg-aiiSIOwNud1x9cQp .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-aiiSIOwNud1x9cQp .note{stroke:#aaaa33;fill:#fff5ad;}#mermaid-svg-aiiSIOwNud1x9cQp .noteText,#mermaid-svg-aiiSIOwNud1x9cQp .noteText&gt;tspan{fill:black;stroke:none;}#mermaid-svg-aiiSIOwNud1x9cQp .activation0{fill:#f4f4f4;stroke:#666;}#mermaid-svg-aiiSIOwNud1x9cQp .activation1{fill:#f4f4f4;stroke:#666;}#mermaid-svg-aiiSIOwNud1x9cQp .activation2{fill:#f4f4f4;stroke:#666;}#mermaid-svg-aiiSIOwNud1x9cQp .actorPopupMenu{position:absolute;}#mermaid-svg-aiiSIOwNud1x9cQp .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-aiiSIOwNud1x9cQp .actor-man line{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:#ECECFF;}#mermaid-svg-aiiSIOwNud1x9cQp .actor-man circle,#mermaid-svg-aiiSIOwNud1x9cQp line{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:#ECECFF;stroke-width:2px;}#mermaid-svg-aiiSIOwNud1x9cQp :root{&#8211;mermaid-font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;}<\/p>\n<p>   \u4e8b\u52a1\u63d0\u4ea4\u5199\u5165 Binlog<\/p>\n<p>   IO \u7ebf\u7a0b\u62c9\u53d6 Binlog<\/p>\n<p>   \u5199\u5165\u4e2d\u7ee7\u65e5\u5fd7 Relay Log<\/p>\n<p>   SQL \u7ebf\u7a0b\u91cd\u653e<\/p>\n<p>   \u66f4\u65b0\u4ece\u5e93\u6570\u636e<\/p>\n<p>\u4e09\u4e2a\u6838\u5fc3\u7ebf\u7a0b&#xff1a;\u4e3b\u5e93 Binlog Dump \u7ebf\u7a0b\u3001\u4ece\u5e93 IO \u7ebf\u7a0b\u3001\u4ece\u5e93 SQL \u7ebf\u7a0b\u3002<\/p>\n<h4>9.2 \u590d\u5236\u6a21\u5f0f\u5bf9\u6bd4<\/h4>\n<table>\n<tr>\u6a21\u5f0f\u539f\u7406\u4f18\u70b9\u7f3a\u70b9<\/tr>\n<tbody>\n<tr>\n<td>\u5f02\u6b65\u590d\u5236&#xff08;\u9ed8\u8ba4&#xff09;<\/td>\n<td>\u4e3b\u5e93\u63d0\u4ea4\u5373\u8fd4\u56de&#xff0c;\u4e0d\u7b49\u5f85\u4ece\u5e93<\/td>\n<td>\u6027\u80fd\u6700\u597d<\/td>\n<td>\u4e3b\u5b95\u673a\u53ef\u80fd\u4e22\u6570\u636e<\/td>\n<\/tr>\n<tr>\n<td>\u534a\u540c\u6b65\u590d\u5236<\/td>\n<td>\u4e3b\u5e93\u7b49\u81f3\u5c11\u4e00\u4e2a\u4ece\u5e93\u63a5\u6536 Binlog \u624d\u8fd4\u56de<\/td>\n<td>\u6570\u636e\u66f4\u5b89\u5168<\/td>\n<td>\u5ef6\u8fdf\u7565\u589e<\/td>\n<\/tr>\n<tr>\n<td>\u7ec4\u590d\u5236 MGR<\/td>\n<td>\u57fa\u4e8e Paxos \u591a\u4e3b\/\u5355\u4e3b\u4e00\u81f4\u6027<\/td>\n<td>\u5f3a\u4e00\u81f4\u3001\u81ea\u52a8\u9009\u4e3b<\/td>\n<td>\u90e8\u7f72\u590d\u6742<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u5ef6\u8fdf\u76d1\u63a7&#xff1a;SHOW SLAVE STATUS \u5173\u6ce8 Seconds_Behind_Master\u3002\u5927\u4e8b\u52a1\u3001\u4ece\u5e93\u5355\u7ebf\u7a0b\u91cd\u653e\u3001\u7f51\u7edc\u6296\u52a8\u662f\u5ef6\u8fdf\u4e3b\u56e0&#xff08;\u53ef\u5f00\u542f\u5e76\u884c\u590d\u5236 slave_parallel_workers&#xff09;\u3002<\/p>\n<hr \/>\n<h3>\u5341\u3001\u5206\u5e93\u5206\u8868<\/h3>\n<h4>10.1 \u4f55\u65f6\u9700\u8981\u62c6\u5206<\/h4>\n<p>\u89e6\u53d1\u4fe1\u53f7&#xff1a;\u5355\u8868\u884c\u6570 &gt; 1000 \u4e07\u3001\u5355\u5e93\u6570\u636e\u91cf &gt; 500GB\u3001QPS \u9ad8\u5230\u5355\u5b9e\u4f8b\u74f6\u9888\u3001\u5907\u4efd\/\u6062\u590d\u8017\u65f6\u8fc7\u957f\u3002<\/p>\n<h4>10.2 \u62c6\u5206\u7ef4\u5ea6<\/h4>\n<p>  #mermaid-svg-rcGg97mfkCdnK4wu{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-rcGg97mfkCdnK4wu .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#mermaid-svg-rcGg97mfkCdnK4wu .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#mermaid-svg-rcGg97mfkCdnK4wu .error-icon{fill:#552222;}#mermaid-svg-rcGg97mfkCdnK4wu .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-rcGg97mfkCdnK4wu .edge-thickness-normal{stroke-width:1px;}#mermaid-svg-rcGg97mfkCdnK4wu .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-rcGg97mfkCdnK4wu .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-rcGg97mfkCdnK4wu .edge-thickness-invisible{stroke-width:0;fill:none;}#mermaid-svg-rcGg97mfkCdnK4wu .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-rcGg97mfkCdnK4wu .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-rcGg97mfkCdnK4wu .marker{fill:#333333;stroke:#333333;}#mermaid-svg-rcGg97mfkCdnK4wu .marker.cross{stroke:#333333;}#mermaid-svg-rcGg97mfkCdnK4wu svg{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-rcGg97mfkCdnK4wu p{margin:0;}#mermaid-svg-rcGg97mfkCdnK4wu .label{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;color:#333;}#mermaid-svg-rcGg97mfkCdnK4wu .cluster-label text{fill:#333;}#mermaid-svg-rcGg97mfkCdnK4wu .cluster-label span{color:#333;}#mermaid-svg-rcGg97mfkCdnK4wu .cluster-label span p{background-color:transparent;}#mermaid-svg-rcGg97mfkCdnK4wu .label text,#mermaid-svg-rcGg97mfkCdnK4wu span{fill:#333;color:#333;}#mermaid-svg-rcGg97mfkCdnK4wu .node rect,#mermaid-svg-rcGg97mfkCdnK4wu .node circle,#mermaid-svg-rcGg97mfkCdnK4wu .node ellipse,#mermaid-svg-rcGg97mfkCdnK4wu .node polygon,#mermaid-svg-rcGg97mfkCdnK4wu .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-svg-rcGg97mfkCdnK4wu .rough-node .label text,#mermaid-svg-rcGg97mfkCdnK4wu .node .label text,#mermaid-svg-rcGg97mfkCdnK4wu .image-shape .label,#mermaid-svg-rcGg97mfkCdnK4wu .icon-shape .label{text-anchor:middle;}#mermaid-svg-rcGg97mfkCdnK4wu .node .katex path{fill:#000;stroke:#000;stroke-width:1px;}#mermaid-svg-rcGg97mfkCdnK4wu .rough-node .label,#mermaid-svg-rcGg97mfkCdnK4wu .node .label,#mermaid-svg-rcGg97mfkCdnK4wu .image-shape .label,#mermaid-svg-rcGg97mfkCdnK4wu .icon-shape .label{text-align:center;}#mermaid-svg-rcGg97mfkCdnK4wu .node.clickable{cursor:pointer;}#mermaid-svg-rcGg97mfkCdnK4wu .root .anchor path{fill:#333333!important;stroke-width:0;stroke:#333333;}#mermaid-svg-rcGg97mfkCdnK4wu .arrowheadPath{fill:#333333;}#mermaid-svg-rcGg97mfkCdnK4wu .edgePath .path{stroke:#333333;stroke-width:2.0px;}#mermaid-svg-rcGg97mfkCdnK4wu .flowchart-link{stroke:#333333;fill:none;}#mermaid-svg-rcGg97mfkCdnK4wu .edgeLabel{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-rcGg97mfkCdnK4wu .edgeLabel p{background-color:rgba(232,232,232, 0.8);}#mermaid-svg-rcGg97mfkCdnK4wu .edgeLabel rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-rcGg97mfkCdnK4wu .labelBkg{background-color:rgba(232, 232, 232, 0.5);}#mermaid-svg-rcGg97mfkCdnK4wu .cluster rect{fill:#ffffde;stroke:#aaaa33;stroke-width:1px;}#mermaid-svg-rcGg97mfkCdnK4wu .cluster text{fill:#333;}#mermaid-svg-rcGg97mfkCdnK4wu .cluster span{color:#333;}#mermaid-svg-rcGg97mfkCdnK4wu 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-rcGg97mfkCdnK4wu .flowchartTitleText{text-anchor:middle;font-size:18px;fill:#333;}#mermaid-svg-rcGg97mfkCdnK4wu rect.text{fill:none;stroke-width:0;}#mermaid-svg-rcGg97mfkCdnK4wu .icon-shape,#mermaid-svg-rcGg97mfkCdnK4wu .image-shape{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-rcGg97mfkCdnK4wu .icon-shape p,#mermaid-svg-rcGg97mfkCdnK4wu .image-shape p{background-color:rgba(232,232,232, 0.8);padding:2px;}#mermaid-svg-rcGg97mfkCdnK4wu .icon-shape .label rect,#mermaid-svg-rcGg97mfkCdnK4wu .image-shape .label rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-rcGg97mfkCdnK4wu .label-icon{display:inline-block;height:1em;overflow:visible;vertical-align:-0.125em;}#mermaid-svg-rcGg97mfkCdnK4wu .node .label-icon path{fill:currentColor;stroke:revert;stroke-width:revert;}#mermaid-svg-rcGg97mfkCdnK4wu :root{&#8211;mermaid-font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;}<\/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=\"edgeLabel\"><\/span><\/p>\n<p>         <span class=\"edgeLabel\"><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>\u5206\u5e93\u5206\u8868<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>\u5782\u76f4\u62c6\u5206<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>\u6c34\u5e73\u62c6\u5206<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>\u5782\u76f4\u5206\u5e93: \u6309\u4e1a\u52a1\u7528\u6237\u5e93\/\u8ba2\u5355\u5e93\/\u5546\u54c1\u5e93<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>\u5782\u76f4\u5206\u8868: \u6309\u51b7\u70ed\u57fa\u7840\u4fe1\u606f\u8868\/\u6269\u5c55\u4fe1\u606f\u8868<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>\u6c34\u5e73\u5206\u8868: \u5355\u8868\u6309\u5206\u7247\u952e\u62c6 N \u5f20<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>\u6c34\u5e73\u5206\u5e93: \u591a\u5b9e\u4f8b\u5206\u62c5<\/p>\n<p><\/span><\/p>\n<h4>10.3 \u5206\u7247\u7b56\u7565<\/h4>\n<table>\n<tr>\u7b56\u7565\u8bf4\u660e\u4f18\u70b9\u7f3a\u70b9<\/tr>\n<tbody>\n<tr>\n<td>\u53d6\u6a21 hash<\/td>\n<td>id % N<\/td>\n<td>\u6570\u636e\u5747\u5300<\/td>\n<td>\u6269\u5bb9\u9700\u8fc1\u79fb\u5927\u91cf\u6570\u636e<\/td>\n<\/tr>\n<tr>\n<td>\u4e00\u81f4\u6027\u54c8\u5e0c<\/td>\n<td>\u865a\u62df\u8282\u70b9\u73af<\/td>\n<td>\u6269\u5bb9\u5f71\u54cd\u5c0f<\/td>\n<td>\u5b9e\u73b0\u590d\u6742<\/td>\n<\/tr>\n<tr>\n<td>\u8303\u56f4 range<\/td>\n<td>\u6309\u65f6\u95f4\/ID \u6bb5<\/td>\n<td>\u6613\u6269\u5bb9\u3001\u6613\u5f52\u6863<\/td>\n<td>\u70ed\u70b9\u503e\u659c&#xff08;\u6700\u65b0\u6570\u636e\u70ed&#xff09;<\/td>\n<\/tr>\n<tr>\n<td>\u54c8\u5e0c&#043;\u8303\u56f4<\/td>\n<td>\u5148\u6309\u65f6\u95f4\u518d\u54c8\u5e0c<\/td>\n<td>\u517c\u987e<\/td>\n<td>\u590d\u6742\u5ea6\u9ad8<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u5de5\u7a0b\u5efa\u8bae&#xff1a;\u5f15\u5165 ShardingSphere \/ MyCat \u7b49\u4e2d\u95f4\u4ef6\u505a\u903b\u8f91\u5206\u7247&#xff0c;\u4e1a\u52a1\u4ee3\u7801\u5c3d\u91cf\u65e0\u611f\u77e5&#xff1b;\u8de8\u5206\u7247 JOIN\u3001\u5206\u5e03\u5f0f\u4e8b\u52a1&#xff08;Seata&#xff09;\u3001\u5168\u5c40\u552f\u4e00 ID&#xff08;\u96ea\u82b1\u7b97\u6cd5&#xff09;\u662f\u5fc5\u987b\u89e3\u51b3\u7684\u914d\u5957\u95ee\u9898\u3002<\/p>\n<hr \/>\n<h3>\u5341\u4e00\u3001\u6570\u636e\u7c7b\u578b\u4e0e\u8303\u5f0f\u8bbe\u8ba1<\/h3>\n<h4>11.1 \u7c7b\u578b\u9009\u578b\u539f\u5219<\/h4>\n<ul>\n<li>\u6574\u6570&#xff1a;\u7528 INT\/BIGINT&#xff0c;\u660e\u786e UNSIGNED&#xff1b;TINYINT \u5b58\u5e03\u5c14&#xff08;MySQL \u65e0\u539f\u751f bool&#xff09;\u3002<\/li>\n<li>\u65e5\u671f&#xff1a;\u4f18\u5148 DATETIME&#xff08;\u8303\u56f4\u5927\u3001\u65e0\u65f6\u533a&#xff09;\u6216 TIMESTAMP&#xff08;4 \u5b57\u8282\u3001\u53d7\u65f6\u533a\u5f71\u54cd\u3001\u4e0a\u9650 2038&#xff09;&#xff1b;\u907f\u514d\u4f7f\u7528\u5b57\u7b26\u4e32\u5b58\u65f6\u95f4\u3002<\/li>\n<li>\u5b57\u7b26\u4e32&#xff1a;\u5b9a\u957f\u7528 CHAR&#xff0c;\u53d8\u957f\u7528 VARCHAR&#xff1b;\u8d85\u957f\u6587\u672c\u7528 TEXT&#xff08;\u4e0d\u8fdb\u805a\u7c07\u7d22\u5f15\u9875&#xff09;&#xff1b;JSON \u7528\u539f\u751f JSON \u7c7b\u578b&#xff08;5.7&#043;&#xff0c;\u652f\u6301\u7d22\u5f15\u5316\u865a\u62df\u5217&#xff09;\u3002<\/li>\n<li>\u91d1\u989d&#xff1a;\u7981\u6b62 FLOAT\/DOUBLE&#xff08;\u7cbe\u5ea6\u4e22\u5931&#xff09;&#xff0c;\u7528 DECIMAL(M,D) \u6216\u6574\u6570\u5206\u5b58\u50a8\u3002<\/li>\n<\/ul>\n<h4>11.2 \u4e09\u8303\u5f0f\u4e0e\u53cd\u8303\u5f0f<\/h4>\n<table>\n<tr>\u8303\u5f0f\u8981\u6c42\u89e3\u51b3\u7684\u95ee\u9898<\/tr>\n<tbody>\n<tr>\n<td>1NF<\/td>\n<td>\u5217\u539f\u5b50\u4e0d\u53ef\u518d\u5206<\/td>\n<td>\u907f\u514d&#034;\u591a\u503c&#034;\u5b57\u6bb5<\/td>\n<\/tr>\n<tr>\n<td>2NF<\/td>\n<td>\u975e\u4e3b\u952e\u5c5e\u6027\u5b8c\u5168\u4f9d\u8d56\u4e3b\u952e<\/td>\n<td>\u6d88\u9664\u90e8\u5206\u4f9d\u8d56<\/td>\n<\/tr>\n<tr>\n<td>3NF<\/td>\n<td>\u975e\u4e3b\u952e\u5c5e\u6027\u4e0d\u4f20\u9012\u4f9d\u8d56\u4e3b\u952e<\/td>\n<td>\u6d88\u9664\u5197\u4f59<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u53cd\u8303\u5f0f\u6743\u8861&#xff1a;\u4e25\u683c\u8303\u5f0f\u5bfc\u81f4\u591a\u8868 JOIN \u6027\u80fd\u635f\u8017&#xff0c;\u5728 \u8bfb\u591a\u5199\u5c11\u3001\u62a5\u8868\u7c7b \u573a\u666f&#xff0c;\u53ef\u4ee5\u6709\u63a7\u5236\u5730\u5197\u4f59\u5b57\u6bb5&#xff08;\u5982\u8ba2\u5355\u8868\u5197\u4f59\u7528\u6237\u540d&#xff09;&#xff0c;\u4ee5\u7a7a\u95f4\u6362 JOIN \u6027\u80fd\u3002\u6838\u5fc3\u662f \u6309\u8bfb\u5199\u6bd4\u4e0e\u4e00\u81f4\u6027\u8981\u6c42\u505a\u53d6\u820d\u3002<\/p>\n<hr \/>\n<h3>\u5341\u4e8c\u3001MySQL 8.0 \u5173\u952e\u65b0\u7279\u6027\u901f\u89c8<\/h3>\n<table>\n<tr>\u7279\u6027\u8bf4\u660e\u6536\u76ca<\/tr>\n<tbody>\n<tr>\n<td>\u9ed8\u8ba4 caching_sha2_password<\/td>\n<td>\u66f4\u5b89\u5168\u7684\u8ba4\u8bc1\u63d2\u4ef6&#xff08;\u65e7\u9a71\u52a8\u9700\u5347\u7ea7&#xff09;<\/td>\n<td>\u5b89\u5168\u6027\u63d0\u5347<\/td>\n<\/tr>\n<tr>\n<td>\u7a97\u53e3\u51fd\u6570<\/td>\n<td>ROW_NUMBER()\/RANK()\/SUM() OVER()<\/td>\n<td>\u544a\u522b\u590d\u6742\u81ea\u8fde\u63a5\u505a\u6392\u540d<\/td>\n<\/tr>\n<tr>\n<td>\u901a\u7528\u8868\u8868\u8fbe\u5f0f CTE<\/td>\n<td>WITH \u8bed\u6cd5<\/td>\n<td>\u9012\u5f52\u67e5\u8be2\u3001\u53ef\u8bfb\u6027\u5f3a<\/td>\n<\/tr>\n<tr>\n<td>\u4e0d\u53ef\u89c1\u7d22\u5f15<\/td>\n<td>INVISIBLE<\/td>\n<td>\u7070\u5ea6\u9a8c\u8bc1\u7d22\u5f15\u5220\u9664&#xff0c;\u96f6\u98ce\u9669<\/td>\n<\/tr>\n<tr>\n<td>\u964d\u5e8f\u7d22\u5f15<\/td>\n<td>DESC \u771f\u5b9e\u9006\u5e8f\u5b58\u50a8<\/td>\n<td>\u591a\u5217\u6df7\u5408\u6392\u5e8f\u6027\u80fd\u63d0\u5347<\/td>\n<\/tr>\n<tr>\n<td>\u539f\u5b50 DDL<\/td>\n<td>\u6570\u636e\u5b57\u5178\u6539\u4e3a InnoDB \u5b58\u50a8<\/td>\n<td>DDL \u5d29\u6e83\u4e0d\u518d\u7559\u534a\u6210\u54c1<\/td>\n<\/tr>\n<tr>\n<td>Hash Join<\/td>\n<td>\u4f18\u5316\u5668\u652f\u6301<\/td>\n<td>\u65e0\u7d22\u5f15\u5927\u8868 JOIN \u63d0\u901f<\/td>\n<\/tr>\n<tr>\n<td>\u8d44\u6e90\u7ec4<\/td>\n<td>\u7ed1\u5b9a CPU<\/td>\n<td>\u9694\u79bb\u9ad8\u4f18\/\u4f4e\u4f18\u8d1f\u8f7d<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<hr \/>\n<h3>\u603b\u7ed3&#xff1a;\u9ad8\u9891\u9762\u8bd5\/\u5b9e\u6218\u901f\u8bb0<\/h3>\n<li>\u7d22\u5f15&#xff1a;B&#043; \u6811\u3001\u805a\u7c07\/\u4e8c\u7ea7\u3001\u56de\u8868\u3001\u8986\u76d6\u3001\u6700\u5de6\u524d\u7f00\u3001\u5931\u6548\u573a\u666f\u3002<\/li>\n<li>\u4e8b\u52a1&#xff1a;ACID \u5b9e\u73b0&#xff08;Undo\/Redo\/\u9501&#043;MVCC&#xff09;\u3001RR \u9632\u5e7b\u8bfb\u9760 Next-Key Lock\u3002<\/li>\n<li>MVCC&#xff1a;\u9690\u85cf\u5b57\u6bb5 &#043; Undo \u7248\u672c\u94fe &#043; ReadView&#xff0c;RR \u590d\u7528\u5feb\u7167\u3001RC \u6bcf\u6b21\u65b0\u5efa\u3002<\/li>\n<li>\u65e5\u5fd7&#xff1a;Redo&#xff08;\u6301\u4e45&#xff09;\u3001Undo&#xff08;\u56de\u6eda\/MVCC&#xff09;\u3001Binlog&#xff08;\u590d\u5236&#xff09;&#xff0c;\u4e24\u9636\u6bb5\u63d0\u4ea4\u4fdd\u4e00\u81f4\u3002<\/li>\n<li>\u4f18\u5316&#xff1a;EXPLAIN \u770b type\/rows\/Extra&#xff0c;\u8fdc\u79bb ALL\u3001filesort\u3001temporary\u3002<\/li>\n<li>\u67b6\u6784&#xff1a;Server \u4e0e\u5f15\u64ce\u5206\u5c42&#xff0c;Buffer Pool \u662f\u6027\u80fd\u6838\u5fc3\u3002<\/li>\n<li>\u6269\u5c55&#xff1a;\u4e3b\u4ece\u590d\u5236\u89e3\u51b3\u8bfb\u6269\u5c55\u4e0e\u5907\u4efd&#xff0c;\u5206\u5e93\u5206\u8868\u89e3\u51b3\u5199\/\u5bb9\u91cf\u74f6\u9888\u3002<\/li>\n<p>\u672c\u6587\u6863\u6301\u7eed\u53ef\u8fed\u4ee3&#xff1a;\u5efa\u8bae\u914d\u5408 EXPLAIN\u3001SHOW ENGINE INNODB STATUS\u3001sys.innodb_buffer_pool_stats \u7b49\u547d\u4ee4\u5728\u771f\u5b9e\u73af\u5883\u9a8c\u8bc1&#xff0c;\u7406\u8bba\u7ed3\u5408 performance_schema \u89c2\u6d4b\u6548\u679c\u6700\u4f73\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>MySQL \u6838\u5fc3\u77e5\u8bc6\u70b9\u5168\u666f\u8be6\u89e3&#xff08;2026 \u6700\u65b0\u7248&#xff09; \u9002\u7528\u7248\u672c&#xff1a;\u672c\u6587\u4ee5 MySQL 8.0 \u4e3a\u4e3b\u8109\u7edc&#xff0c;\u517c\u987e 5.7 \u91cd\u8981\u5dee\u5f02\u3002\u5185\u5bb9\u8986\u76d6\u67b6\u6784\u3001\u5b58\u50a8\u5f15\u64ce\u3001\u7d22\u5f15\u3001\u4e8b\u52a1\u3001MVCC\u3001\u9501\u3001\u65e5\u5fd7\u3001SQL \u4f18\u5316\u3001\u4e3b\u4ece\u590d\u5236\u3001\u5206\u5e93\u5206\u8868\u4e0e\u6570\u636e\u7c7b\u578b\u9009\u578b&#xff0c;\u914d\u5408\u6d41\u7a0b\u56fe\u4e0e\u7ed3\u6784\u56fe\u5e2e\u52a9\u5efa\u7acb\u5168\u5c40\u5fc3\u667a\u6a21\u578b\u3002 \u4f5c\u8005&#xff1a;\u4e00\u4f4d\u60f3\u8fdb\u5927\u5382\u7684\u6811\u5148\u751f&#xff1a;Mr.Tree\u3002 \u76ee\u5f55<br \/>\nMySQL \u6574\u4f53\u67b6\u6784\u5b58\u50a8\u5f15\u64ce&#xff08;InnoDB <\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[116,114,100],"topic":[],"class_list":["post-112986","post","type-post","status-publish","format-standard","hentry","category-server","tag-adb","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\u6838\u5fc3\u77e5\u8bc6\u70b9\u5168\u666f\u8be6\u89e3 - \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\/112986.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"MySQL\u6838\u5fc3\u77e5\u8bc6\u70b9\u5168\u666f\u8be6\u89e3 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"MySQL \u6838\u5fc3\u77e5\u8bc6\u70b9\u5168\u666f\u8be6\u89e3&#xff08;2026 \u6700\u65b0\u7248&#xff09; \u9002\u7528\u7248\u672c&#xff1a;\u672c\u6587\u4ee5 MySQL 8.0 \u4e3a\u4e3b\u8109\u7edc&#xff0c;\u517c\u987e 5.7 \u91cd\u8981\u5dee\u5f02\u3002\u5185\u5bb9\u8986\u76d6\u67b6\u6784\u3001\u5b58\u50a8\u5f15\u64ce\u3001\u7d22\u5f15\u3001\u4e8b\u52a1\u3001MVCC\u3001\u9501\u3001\u65e5\u5fd7\u3001SQL \u4f18\u5316\u3001\u4e3b\u4ece\u590d\u5236\u3001\u5206\u5e93\u5206\u8868\u4e0e\u6570\u636e\u7c7b\u578b\u9009\u578b&#xff0c;\u914d\u5408\u6d41\u7a0b\u56fe\u4e0e\u7ed3\u6784\u56fe\u5e2e\u52a9\u5efa\u7acb\u5168\u5c40\u5fc3\u667a\u6a21\u578b\u3002 \u4f5c\u8005&#xff1a;\u4e00\u4f4d\u60f3\u8fdb\u5927\u5382\u7684\u6811\u5148\u751f&#xff1a;Mr.Tree\u3002 \u76ee\u5f55 MySQL \u6574\u4f53\u67b6\u6784\u5b58\u50a8\u5f15\u64ce&#xff08;InnoDB\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/112986.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-10-05T02:41:08+00:00\" \/>\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=\"36 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/112986.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/112986.html\",\"name\":\"MySQL\u6838\u5fc3\u77e5\u8bc6\u70b9\u5168\u666f\u8be6\u89e3 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-10-05T02:41:08+00:00\",\"dateModified\":\"2026-10-05T02:41:08+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/112986.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/112986.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/112986.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"MySQL\u6838\u5fc3\u77e5\u8bc6\u70b9\u5168\u666f\u8be6\u89e3\"}]},{\"@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\u6838\u5fc3\u77e5\u8bc6\u70b9\u5168\u666f\u8be6\u89e3 - \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\/112986.html","og_locale":"zh_CN","og_type":"article","og_title":"MySQL\u6838\u5fc3\u77e5\u8bc6\u70b9\u5168\u666f\u8be6\u89e3 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"MySQL \u6838\u5fc3\u77e5\u8bc6\u70b9\u5168\u666f\u8be6\u89e3&#xff08;2026 \u6700\u65b0\u7248&#xff09; \u9002\u7528\u7248\u672c&#xff1a;\u672c\u6587\u4ee5 MySQL 8.0 \u4e3a\u4e3b\u8109\u7edc&#xff0c;\u517c\u987e 5.7 \u91cd\u8981\u5dee\u5f02\u3002\u5185\u5bb9\u8986\u76d6\u67b6\u6784\u3001\u5b58\u50a8\u5f15\u64ce\u3001\u7d22\u5f15\u3001\u4e8b\u52a1\u3001MVCC\u3001\u9501\u3001\u65e5\u5fd7\u3001SQL \u4f18\u5316\u3001\u4e3b\u4ece\u590d\u5236\u3001\u5206\u5e93\u5206\u8868\u4e0e\u6570\u636e\u7c7b\u578b\u9009\u578b&#xff0c;\u914d\u5408\u6d41\u7a0b\u56fe\u4e0e\u7ed3\u6784\u56fe\u5e2e\u52a9\u5efa\u7acb\u5168\u5c40\u5fc3\u667a\u6a21\u578b\u3002 \u4f5c\u8005&#xff1a;\u4e00\u4f4d\u60f3\u8fdb\u5927\u5382\u7684\u6811\u5148\u751f&#xff1a;Mr.Tree\u3002 \u76ee\u5f55 MySQL \u6574\u4f53\u67b6\u6784\u5b58\u50a8\u5f15\u64ce&#xff08;InnoDB","og_url":"https:\/\/www.wsisp.com\/helps\/112986.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-10-05T02:41:08+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"36 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/112986.html","url":"https:\/\/www.wsisp.com\/helps\/112986.html","name":"MySQL\u6838\u5fc3\u77e5\u8bc6\u70b9\u5168\u666f\u8be6\u89e3 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-10-05T02:41:08+00:00","dateModified":"2026-10-05T02:41:08+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/112986.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/112986.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/112986.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"MySQL\u6838\u5fc3\u77e5\u8bc6\u70b9\u5168\u666f\u8be6\u89e3"}]},{"@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\/112986","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=112986"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/112986\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=112986"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=112986"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=112986"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=112986"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}