{"id":46114,"date":"2025-07-30T02:26:31","date_gmt":"2025-07-29T18:26:31","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/46114.html"},"modified":"2025-07-30T02:26:31","modified_gmt":"2025-07-29T18:26:31","slug":"%e3%80%90%e7%a7%8b%e6%8b%9b%e5%bf%85%e7%9c%8b%e3%80%91mysql-%e9%9d%a2%e8%af%95%e7%83%ad%e9%a2%98%ef%bc%88%e4%ba%8c%ef%bc%89","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/46114.html","title":{"rendered":"\u3010\u79cb\u62db\u5fc5\u770b\u3011MySQL \u9762\u8bd5\u70ed\u9898\uff08\u4e8c\uff09"},"content":{"rendered":"<p id=\"main-toc\">\u76ee\u5f55<\/p>\n<p id=\"1.%E8%AF%B7%E8%AF%A6%E7%BB%86%E6%8F%8F%E8%BF%B0%20MySQL%20%E7%9A%84%20B%2B%20%E6%A0%91%E4%B8%AD%E6%9F%A5%E8%AF%A2%E6%95%B0%E6%8D%AE%E7%9A%84%E5%85%A8%E8%BF%87%E7%A8%8B%E3%80%82%EF%BC%88%E9%9A%BE%EF%BC%89-toc\" style=\"margin-left:0px\">1.\u8bf7\u8be6\u7ec6\u63cf\u8ff0 MySQL \u7684 B&#043; \u6811\u4e2d\u67e5\u8be2\u6570\u636e\u7684\u5168\u8fc7\u7a0b\u3002&#xff08;\u96be&#xff09;<\/p>\n<p id=\"2.%E4%B8%BA%E4%BB%80%E4%B9%88%20MySQL%20%E9%80%89%E6%8B%A9%E4%BD%BF%E7%94%A8%20B%2B%20%E6%A0%91%E4%BD%9C%E4%B8%BA%E7%B4%A2%E5%BC%95%E7%BB%93%E6%9E%84%EF%BC%9F%EF%BC%88%E4%B8%AD%EF%BC%89-toc\" style=\"margin-left:0px\">2.\u4e3a\u4ec0\u4e48 MySQL \u9009\u62e9\u4f7f\u7528 B&#043; \u6811\u4f5c\u4e3a\u7d22\u5f15\u7ed3\u6784&#xff1f;&#xff08;\u4e2d&#xff09;<\/p>\n<p id=\"3.MySQL%20%E4%B8%89%E5%B1%82%20B%2B%20%E6%A0%91%E8%83%BD%E5%AD%98%E5%A4%9A%E5%B0%91%E6%95%B0%E6%8D%AE%EF%BC%9F%EF%BC%88%E4%B8%AD%EF%BC%89-toc\" style=\"margin-left:0px\">3.MySQL \u4e09\u5c42 B&#043; \u6811\u80fd\u5b58\u591a\u5c11\u6570\u636e&#xff1f;&#xff08;\u4e2d&#xff09;<\/p>\n<p id=\"4.%E8%AF%A6%E7%BB%86%E6%8F%8F%E8%BF%B0%E4%B8%80%E6%9D%A1%20SQL%20%E8%AF%AD%E5%8F%A5%E5%9C%A8%20MySQL%20%E4%B8%AD%E7%9A%84%E6%89%A7%E8%A1%8C%E8%BF%87%E7%A8%8B%E3%80%82%EF%BC%88%E4%B8%AD%EF%BC%89-toc\" style=\"margin-left:0px\">4.\u8be6\u7ec6\u63cf\u8ff0\u4e00\u6761 SQL \u8bed\u53e5\u5728 MySQL \u4e2d\u7684\u6267\u884c\u8fc7\u7a0b\u3002&#xff08;\u4e2d&#xff09;<\/p>\n<p id=\"5.MySQL%20%E6%98%AF%E5%A6%82%E4%BD%95%E5%AE%9E%E7%8E%B0%E4%BA%8B%E5%8A%A1%E7%9A%84%EF%BC%9F%EF%BC%88%E9%9A%BE%EF%BC%89-toc\" style=\"margin-left:0px\">5.MySQL \u662f\u5982\u4f55\u5b9e\u73b0\u4e8b\u52a1\u7684&#xff1f;&#xff08;\u96be&#xff09;<\/p>\n<p id=\"6.MySQL%20%E4%BA%8B%E5%8A%A1%E7%9A%84%E4%BA%8C%E9%98%B6%E6%AE%B5%E6%8F%90%E4%BA%A4%E6%98%AF%E4%BB%80%E4%B9%88%EF%BC%9F%EF%BC%88%E4%B8%AD%EF%BC%89-toc\" style=\"margin-left:0px\">6.MySQL \u4e8b\u52a1\u7684\u4e8c\u9636\u6bb5\u63d0\u4ea4\u662f\u4ec0\u4e48&#xff1f;&#xff08;\u4e2d&#xff09;<\/p>\n<p id=\"7.MySQL%20%E4%B8%AD%E9%95%BF%E4%BA%8B%E5%8A%A1%E5%8F%AF%E8%83%BD%E4%BC%9A%E5%AF%BC%E8%87%B4%E5%93%AA%E4%BA%9B%E9%97%AE%E9%A2%98%EF%BC%9F%C2%A0%C2%A0%20%C2%A0%EF%BC%88%E4%B8%AD%EF%BC%89-toc\" style=\"margin-left:0px\">7.MySQL \u4e2d\u957f\u4e8b\u52a1\u53ef\u80fd\u4f1a\u5bfc\u81f4\u54ea\u4e9b\u95ee\u9898&#xff1f;\u00a0\u00a0 \u00a0&#xff08;\u4e2d&#xff09;<\/p>\n<p id=\"8.MySQL%20%E4%B8%AD%E7%9A%84%20MVCC%20%E6%98%AF%E4%BB%80%E4%B9%88%EF%BC%9F%EF%BC%88%E9%9A%BE%EF%BC%89-toc\" style=\"margin-left:0px\">8.MySQL \u4e2d\u7684 MVCC \u662f\u4ec0\u4e48&#xff1f;&#xff08;\u96be&#xff09;<\/p>\n<p id=\"9.MySQL%20%E4%B8%AD%E7%9A%84%E4%BA%8B%E5%8A%A1%E9%9A%94%E7%A6%BB%E7%BA%A7%E5%88%AB%E6%9C%89%E5%93%AA%E4%BA%9B%EF%BC%9F%EF%BC%88%E6%98%93%EF%BC%89-toc\" style=\"margin-left:0px\">9.MySQL \u4e2d\u7684\u4e8b\u52a1\u9694\u79bb\u7ea7\u522b\u6709\u54ea\u4e9b&#xff1f;&#xff08;\u6613&#xff09;<\/p>\n<p id=\"10.MySQL%20%E9%BB%98%E8%AE%A4%E7%9A%84%E4%BA%8B%E5%8A%A1%E9%9A%94%E7%A6%BB%E7%BA%A7%E5%88%AB%E6%98%AF%E4%BB%80%E4%B9%88%EF%BC%9F%E4%B8%BA%E4%BB%80%E4%B9%88%E9%80%89%E6%8B%A9%E8%BF%99%E4%B8%AA%E7%BA%A7%E5%88%AB%EF%BC%9F%EF%BC%88%E6%98%93%EF%BC%89-toc\" style=\"margin-left:0px\">10.MySQL \u9ed8\u8ba4\u7684\u4e8b\u52a1\u9694\u79bb\u7ea7\u522b\u662f\u4ec0\u4e48&#xff1f;\u4e3a\u4ec0\u4e48\u9009\u62e9\u8fd9\u4e2a\u7ea7\u522b&#xff1f;&#xff08;\u6613&#xff09;<\/p>\n<hr id=\"hr-toc\" \/>\n<h2 id=\"1.%E8%AF%B7%E8%AF%A6%E7%BB%86%E6%8F%8F%E8%BF%B0%20MySQL%20%E7%9A%84%20B%2B%20%E6%A0%91%E4%B8%AD%E6%9F%A5%E8%AF%A2%E6%95%B0%E6%8D%AE%E7%9A%84%E5%85%A8%E8%BF%87%E7%A8%8B%E3%80%82%EF%BC%88%E9%9A%BE%EF%BC%89\" style=\"background-color:transparent\">1.\u8bf7\u8be6\u7ec6\u63cf\u8ff0 MySQL \u7684 B&#043; \u6811\u4e2d\u67e5\u8be2\u6570\u636e\u7684\u5168\u8fc7\u7a0b\u3002&#xff08;\u96be&#xff09;<\/h2>\n<p>1&#xff09;\u81ea\u9876\u5411\u4e0b\u5b9a\u4f4d&#xff1a;\u67e5\u8be2\u4ece B&#043; \u6811\u7684\u6839\u8282\u70b9\u5f00\u59cb&#xff0c;\u901a\u8fc7\u4e8c\u5206\u67e5\u627e\u4e0d\u65ad\u4e0e\u8282\u70b9\u5185\u7684\u6709\u5e8f\u952e\u503c\u8fdb\u884c\u6bd4\u8f83&#xff0c;\u9009\u62e9\u6b63\u786e\u7684\u6307\u9488\u5411\u4e0b\u5c42\u904d\u5386&#xff08;\u975e\u53f6\u5b50\u8282\u70b9\u5c42&#xff09;&#xff0c;\u76f4\u5230\u62b5\u8fbe\u5305\u542b\u76ee\u6807\u6570\u636e\u7684\u53f6\u5b50\u8282\u70b9\u5c42\u3002<\/p>\n<p>2&#xff09;\u5224\u65ad\u7d22\u5f15&#xff1a;\u82e5\u662f\u4e3b\u952e\u7d22\u5f15&#xff0c;\u53f6\u5b50\u8282\u70b9\u6761\u76ee\u76f4\u63a5\u5305\u542b\u5b8c\u6574\u6570\u636e\u884c&#xff0c;\u76f4\u63a5\u8bfb\u53d6\u8fd4\u56de\u3002\u82e5\u662f\u4e8c\u7ea7\u7d22\u5f15&#xff0c;\u53f6\u5b50\u8282\u70b9\u6761\u76ee\u5305\u542b\u7d22\u5f15\u952e\u503c\u548c\u4e3b\u952e\u503c&#xff0c;\u9700\u8981\u6839\u636e\u4e3b\u952e\u503c\u56de\u8868\u67e5\u8be2\u4e3b\u952e\u7d22\u5f15\u7684 B&#043; \u6811\u6765\u83b7\u53d6\u5b8c\u6574\u884c\u6570\u636e\u3002<\/p>\n<p>3&#xff09;\u8303\u56f4\u67e5\u8be2&#xff1a;B&#043; \u6811\u53f6\u5b50\u8282\u70b9\u901a\u8fc7\u53cc\u5411\u94fe\u8868\u8fde\u63a5&#xff0c;\u8303\u56f4\u67e5\u8be2\u53ea\u9700\u5b9a\u4f4d\u5230\u8d77\u59cb\u70b9&#xff0c;\u7136\u540e\u987a\u5e8f\u904d\u5386\u94fe\u8868\u5373\u53ef\u9ad8\u6548\u83b7\u53d6\u8303\u56f4\u5185\u6240\u6709\u8bb0\u5f55\u3002<\/p>\n<\/p>\n<p>\u62d3\u5c55&#xff1a;<\/p>\n<p>\u5173\u4e8eB&#043;\u6811&#xff1a;\u6570\u636e\u7ed3\u6784\u5408\u96c6 &#8211; B&#043;\u6811_\u54d4\u54e9\u54d4\u54e9_bilibili<\/p>\n<p>\u4e09\u9636B&#043;\u6811&#xff1a;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"1284\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/07\/20250729182626-68891252955c7.png\" width=\"2496\" \/><\/p>\n<p>\u8ffd\u95ee&#xff1a;\u4e3a\u4ec0\u4e48\u9009\u62e9\u00a0B&#043; \u6811&#xff1f;<\/p>\n<\/p>\n<h2 id=\"2.%E4%B8%BA%E4%BB%80%E4%B9%88%20MySQL%20%E9%80%89%E6%8B%A9%E4%BD%BF%E7%94%A8%20B%2B%20%E6%A0%91%E4%BD%9C%E4%B8%BA%E7%B4%A2%E5%BC%95%E7%BB%93%E6%9E%84%EF%BC%9F%EF%BC%88%E4%B8%AD%EF%BC%89\" style=\"background-color:transparent\">2.\u4e3a\u4ec0\u4e48 MySQL \u9009\u62e9\u4f7f\u7528 B&#043; \u6811\u4f5c\u4e3a\u7d22\u5f15\u7ed3\u6784&#xff1f;&#xff08;\u4e2d&#xff09;<\/h2>\n<p>1&#xff09;\u51cf\u5c11\u78c1\u76d8 I\/O \u6b21\u6570&#xff1a;B&#043;\u6811\u662f\u4e00\u79cd\u591a\u8def\u5e73\u8861\u6811&#xff0c;\u76f8\u540c\u6570\u636e\u91cf\u4e0b&#xff0c;B&#043; \u6811\u7684\u9ad8\u5ea6\u8fdc\u4f4e\u4e8e\u4e8c\u53c9\u6811&#xff08;\u5982 AVL\u3001\u7ea2\u9ed1\u6811&#xff09;&#xff0c;3~4 \u5c42\u5373\u53ef\u652f\u6491\u5343\u4e07\u7ea7\u6570\u636e&#xff0c;\u67e5\u8be2\u65f6\u6700\u591a\u53ea\u9700 3~4 \u6b21\u78c1\u76d8 I\/O\u3002<\/p>\n<p>2&#xff09;\u8303\u56f4\u67e5\u8be2\u9ad8\u6548&#xff1a;B&#043; \u6811\u53f6\u5b50\u8282\u70b9\u901a\u8fc7\u53cc\u5411\u94fe\u8868\u8fde\u63a5&#xff0c;\u8303\u56f4\u67e5\u8be2\u53ea\u9700\u5b9a\u4f4d\u5230\u8d77\u59cb\u70b9&#xff0c;\u7136\u540e\u987a\u5e8f\u904d\u5386\u94fe\u8868\u5373\u53ef\u9ad8\u6548\u83b7\u53d6\u8303\u56f4\u5185\u6240\u6709\u8bb0\u5f55\u3002<\/p>\n<p>3&#xff09;\u6570\u636e\u5b58\u50a8\u66f4\u96c6\u4e2d&#xff1a;\u975e\u53f6\u5b50\u8282\u70b9\u4ec5\u4f5c\u7d22\u5f15\u5bfc\u822a&#xff0c;\u6240\u6709\u771f\u5b9e\u6570\u636e&#xff08;\u6216\u4e3b\u952e\u6307\u9488&#xff09;\u96c6\u4e2d\u5b58\u50a8\u5728\u53f6\u5b50\u8282\u70b9\u3002\u4f7f\u5f97\u975e\u53f6\u5b50\u8282\u70b9\u53ef\u7f13\u5b58\u5230\u5185\u5b58&#xff0c;\u52a0\u901f\u67e5\u8be2\u8def\u5f84\u68c0\u7d22&#xff1b;\u987a\u5e8f\u626b\u63cf\u5168\u8868\u65f6&#xff0c;\u76f4\u63a5\u904d\u5386\u53f6\u5b50\u8282\u70b9\u94fe\u8868&#xff0c;\u6548\u7387\u63a5\u8fd1\u987a\u5e8f I\/O\u3002<\/p>\n<\/p>\n<p>\u62d3\u5c55&#xff1a;<\/p>\n<p>B&#043;\u6811\u4e0eB\u6811&#xff1a;<\/p>\n<table>\n<tr>\u7279\u6027B&#043;\u6811B\u6811<\/tr>\n<tbody>\n<tr>\n<td>\u6570\u636e\u5b58\u50a8\u4f4d\u7f6e<\/td>\n<td>\u4ec5\u53f6\u5b50\u8282\u70b9\u5b58\u50a8\u6570\u636e<\/td>\n<td>\u6240\u6709\u8282\u70b9\u5747\u53ef\u5b58\u50a8\u6570\u636e<\/td>\n<\/tr>\n<tr>\n<td>\u53f6\u5b50\u8282\u70b9\u7ed3\u6784<\/td>\n<td>\u53cc\u5411\u94fe\u8868\u8fde\u63a5&#xff0c;\u652f\u6301\u987a\u5e8f\u626b\u63cf<\/td>\n<td>\u65e0\u94fe\u8868&#xff0c;\u8303\u56f4\u67e5\u8be2\u6548\u7387\u4f4e<\/td>\n<\/tr>\n<tr>\n<td>\u975e\u53f6\u5b50\u8282\u70b9\u529f\u80fd<\/td>\n<td>\u7eaf\u7d22\u5f15&#xff0c;\u65e0\u6570\u636e\u6307\u9488<\/td>\n<td>\u5b58\u50a8\u6570\u636e\u6307\u9488<\/td>\n<\/tr>\n<tr>\n<td>\u6811\u9ad8\u4e0eI\/O<\/td>\n<td>\u66f4\u4f4e&#xff08;\u76f8\u540c\u6570\u636e\u91cf\u4e0b&#xff09;<\/td>\n<td>\u8f83\u9ad8<\/td>\n<\/tr>\n<tr>\n<td>\u9002\u7528\u573a\u666f<\/td>\n<td>\u8303\u56f4\u67e5\u8be2\u3001\u78c1\u76d8\u6570\u636e\u5e93\u7d22\u5f15<\/td>\n<td>\u5185\u5b58\u6570\u636e\u5e93\u6216\u7279\u5b9a\u573a\u666f<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2 id=\"3.MySQL%20%E4%B8%89%E5%B1%82%20B%2B%20%E6%A0%91%E8%83%BD%E5%AD%98%E5%A4%9A%E5%B0%91%E6%95%B0%E6%8D%AE%EF%BC%9F%EF%BC%88%E4%B8%AD%EF%BC%89\">3.MySQL \u4e09\u5c42 B&#043; \u6811\u80fd\u5b58\u591a\u5c11\u6570\u636e&#xff1f;&#xff08;\u4e2d&#xff09;<\/h2>\n<p>MySQL \u4e09\u5c42 B&#043; \u6811\u7684\u5b58\u50a8\u91cf\u4e3b\u8981\u7531\u9875\u5927\u5c0f\u3001\u4e3b\u952e\u957f\u5ea6\u548c\u6570\u636e\u884c\u5927\u5c0f\u51b3\u5b9a\u3002\u4ee5 InnoDB \u9ed8\u8ba4\u9875\u5927\u5c0f 16KB\u3001BIGINT \u4e3b\u952e\u548c 1KB \u5355\u884c\u4e3a\u4f8b&#xff0c;\u6839\u8282\u70b9\u548c\u7b2c\u4e8c\u5c42\u975e\u53f6\u5b50\u8282\u70b9\u5404\u5b58\u50a8\u7ea6 1170 \u4e2a\u6307\u9488&#xff0c;\u53f6\u5b50\u8282\u70b9\u6bcf\u9875\u5b58\u50a8\u7ea6 16 \u884c\u6570\u636e&#xff0c;\u4e09\u5c42\u7ed3\u6784\u603b\u8ba1\u53ef\u652f\u6491\u7ea6 2200 \u4e07\u884c\u6570\u636e\u3002<\/p>\n<\/p>\n<p>\u62d3\u5c55&#xff1a;<\/p>\n<p>I.\u8be6\u7ec6\u8ba1\u7b97&#xff08;\u4ee5\u00a0InnoDB\u00a0\u9ed8\u8ba4\u914d\u7f6e\u4e3a\u4f8b&#xff09;&#xff1a;<\/p>\n<li>\n<p>\u9875\u5927\u5c0f&#xff1a;16KB&#xff08;16384 \u5b57\u8282&#xff09;<\/p>\n<\/li>\n<li>\n<p>\u4e3b\u952e\u7c7b\u578b&#xff1a;\u5047\u8bbe\u4e3a\u00a0BIGINT&#xff08;8 \u5b57\u8282&#xff09;<\/p>\n<\/li>\n<li>\n<p>\u6307\u9488\u5927\u5c0f&#xff1a;\u9875\u5185\u6307\u9488\u00a06 \u5b57\u8282&#xff08;InnoDB \u7ea6\u5b9a&#xff09;<\/p>\n<\/li>\n<li>\n<p>\u6570\u636e\u884c\u5927\u5c0f&#xff1a;\u5047\u8bbe\u5355\u884c\u00a01KB&#xff08;\u5b9e\u9645\u573a\u666f\u9700\u6309\u5b57\u6bb5\u8ba1\u7b97&#xff09;<\/p>\n<\/li>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"808\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/07\/20250729182629-68891255d6433.png\" width=\"1155\" \/><\/p>\n<\/p>\n<h2 id=\"4.%E8%AF%A6%E7%BB%86%E6%8F%8F%E8%BF%B0%E4%B8%80%E6%9D%A1%20SQL%20%E8%AF%AD%E5%8F%A5%E5%9C%A8%20MySQL%20%E4%B8%AD%E7%9A%84%E6%89%A7%E8%A1%8C%E8%BF%87%E7%A8%8B%E3%80%82%EF%BC%88%E4%B8%AD%EF%BC%89\">4.\u8be6\u7ec6\u63cf\u8ff0\u4e00\u6761 SQL \u8bed\u53e5\u5728 MySQL \u4e2d\u7684\u6267\u884c\u8fc7\u7a0b\u3002&#xff08;\u4e2d&#xff09;<\/h2>\n<p>1&#xff09;\u8fde\u63a5\u5668\u5efa\u7acb\u901a\u4fe1\u5e76\u9a8c\u8bc1\u6743\u9650\u3002<\/p>\n<p>2&#xff09;\u89e3\u6790\u5668\u8fdb\u884c\u8bcd\u6cd5\/\u8bed\u6cd5\u5206\u6790\u751f\u6210\u89e3\u6790\u6811\u3002<\/p>\n<p>3&#xff09;\u4f18\u5316\u5668\u57fa\u4e8e\u6210\u672c\u6a21\u578b\u9009\u62e9\u6700\u4f18\u6267\u884c\u8ba1\u5212&#xff08;\u5982\u7d22\u5f15\u9009\u62e9&#xff09;\u3002<\/p>\n<p>4&#xff09;\u6267\u884c\u5668\u8c03\u7528\u5b58\u50a8\u5f15\u64ce\u8bfb\u5199\u6570\u636e&#xff08;\u901a\u8fc7 Buffer Pool \u51cf\u5c11\u78c1\u76d8 I\/O&#xff09;\u3002<\/p>\n<p>5&#xff09;\u7ed3\u679c\u96c6\u7ecf\u5904\u7406\u540e\u8fd4\u56de\u5ba2\u6237\u7aef\u3002<\/p>\n<\/p>\n<p>\u62d3\u5c55&#xff1a;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"189\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/07\/20250729182630-688912564ed30.png\" width=\"1119\" \/><\/p>\n<p>I.\u5177\u4f53\u5b9e\u73b0&#xff1a;<\/p>\n<li>\n<p>\u8fde\u63a5\u9636\u6bb5<\/p>\n<ul>\n<li>\n<p>\u5ba2\u6237\u7aef\u4e0e MySQL \u670d\u52a1\u5668\u5efa\u7acb\u8fde\u63a5&#xff08;TCP\/IP \u6216 socket&#xff09;<\/p>\n<\/li>\n<li>\n<p>\u8fde\u63a5\u5668\u9a8c\u8bc1\u7528\u6237\u540d\u5bc6\u7801\u53ca\u6743\u9650<\/p>\n<\/li>\n<li>\n<p>\u8fde\u63a5\u6210\u529f\u540e\u5206\u914d\u7ebf\u7a0b\u5e76\u68c0\u67e5\u67e5\u8be2\u7f13\u5b58&#xff08;MySQL 8.0 \u5df2\u79fb\u9664&#xff09;<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>\u89e3\u6790\u4e0e\u9884\u5904\u7406<\/p>\n<ul>\n<li>\n<p>\u67e5\u8be2\u89e3\u6790\u5668\u8fdb\u884c\u8bcd\u6cd5\u5206\u6790&#xff08;\u8bc6\u522b SQL \u5173\u952e\u8bcd&#xff09;\u548c\u8bed\u6cd5\u5206\u6790&#xff08;\u751f\u6210\u89e3\u6790\u6811&#xff09;<\/p>\n<\/li>\n<li>\n<p>\u9884\u5904\u7406\u5668\u68c0\u67e5\u8868\/\u5217\u662f\u5426\u5b58\u5728&#xff0c;\u89e3\u6790\u540d\u5b57\u548c\u522b\u540d<\/p>\n<\/li>\n<li>\n<p>\u9a8c\u8bc1\u7528\u6237\u662f\u5426\u6709\u76f8\u5e94\u64cd\u4f5c\u6743\u9650<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>\u67e5\u8be2\u4f18\u5316<\/p>\n<ul>\n<li>\n<p>\u4f18\u5316\u5668\u751f\u6210\u591a\u79cd\u6267\u884c\u8ba1\u5212&#xff0c;\u57fa\u4e8e\u6210\u672c\u6a21\u578b\u9009\u62e9\u6700\u4f18\u65b9\u6848<\/p>\n<\/li>\n<li>\n<p>\u51b3\u5b9a\u4f7f\u7528\u54ea\u4e9b\u7d22\u5f15\u3001\u591a\u8868\u8fde\u63a5\u987a\u5e8f\u3001\u662f\u5426\u4f7f\u7528\u4e34\u65f6\u8868\u7b49<\/p>\n<\/li>\n<li>\n<p>\u751f\u6210\u6267\u884c\u8ba1\u5212\u5e76\u4f20\u9012\u7ed9\u6267\u884c\u5f15\u64ce<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>\u6267\u884c\u9636\u6bb5<\/p>\n<ul>\n<li>\n<p>\u6267\u884c\u5f15\u64ce\u8c03\u7528\u5b58\u50a8\u5f15\u64ce API<\/p>\n<\/li>\n<li>\n<p>\u5bf9\u4e8e\u67e5\u8be2&#xff1a;\u901a\u8fc7\u7d22\u5f15\u68c0\u7d22\u6570\u636e&#xff08;\u53ef\u80fd\u6d89\u53ca\u56de\u8868&#xff09;<\/p>\n<\/li>\n<li>\n<p>\u5bf9\u4e8e\u66f4\u65b0&#xff1a;\u5148\u67e5\u8be2\u540e\u4fee\u6539&#xff0c;\u8bb0\u5f55 undo log<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>\u7ed3\u679c\u8fd4\u56de<\/p>\n<ul>\n<li>\n<p>\u5c06\u7ed3\u679c\u96c6\u653e\u5165\u7f51\u7edc\u7f13\u51b2\u533a<\/p>\n<\/li>\n<li>\n<p>\u9010\u6b65\u8fd4\u56de\u7ed9\u5ba2\u6237\u7aef<\/p>\n<\/li>\n<li>\n<p>\u5982\u679c\u662f\u66f4\u65b0\u64cd\u4f5c\u8fd8\u4f1a\u8bb0\u5f55 binlog \u548c redo log<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<h2 id=\"5.MySQL%20%E6%98%AF%E5%A6%82%E4%BD%95%E5%AE%9E%E7%8E%B0%E4%BA%8B%E5%8A%A1%E7%9A%84%EF%BC%9F%EF%BC%88%E9%9A%BE%EF%BC%89\" style=\"background-color:transparent\">5.MySQL \u662f\u5982\u4f55\u5b9e\u73b0\u4e8b\u52a1\u7684&#xff1f;&#xff08;\u96be&#xff09;<\/h2>\n<p>MySQL \u901a\u8fc7\u00a0InnoDB \u5b58\u50a8\u5f15\u64ce\u5b9e\u73b0\u4e8b\u52a1&#xff0c;\u6838\u5fc3\u4f9d\u8d56\u00a0Redo Log&#xff08;\u91cd\u505a\u65e5\u5fd7&#xff09;\u3001Undo Log&#xff08;\u56de\u6eda\u65e5\u5fd7&#xff09;\u3001\u9501\u673a\u5236\u00a0\u548c\u00a0MVCC&#xff08;\u591a\u7248\u672c\u5e76\u53d1\u63a7\u5236&#xff09;\u00a0\u56db\u5927\u7ec4\u4ef6\u534f\u540c\u5de5\u4f5c&#xff0c;\u4fdd\u969c ACID \u7279\u6027\u3002<\/p>\n<p>1&#xff09;\u539f\u5b50\u6027&#xff1a;\u00a0Undo Log \u8bb0\u5f55\u65e7\u7248\u672c&#xff0c;\u652f\u6301\u56de\u6eda&#xff1b; 2&#xff09;\u6301\u4e45\u6027&#xff1a;\u00a0Redo Log \u4f18\u5148\u5199\u76d8&#xff08;WAL \u673a\u5236&#xff09;&#xff0c;\u5d29\u6e83\u540e\u91cd\u653e\u6062\u590d\u6570\u636e&#xff1b; 3&#xff09;\u9694\u79bb\u6027&#xff1a;<\/p>\n<ul>\n<li>\n<p>\u9501\u673a\u5236&#xff08;\u884c\u9501&#043;\u95f4\u9699\u9501&#xff09;\u89e3\u51b3\u5199\u51b2\u7a81\u4e0e\u5e7b\u8bfb&#xff1b;<\/p>\n<\/li>\n<li>\n<p>MVCC \u901a\u8fc7 ReadView \u548c\u7248\u672c\u94fe\u5b9e\u73b0\u975e\u963b\u585e\u8bfb&#xff08;RC\/RR \u7ea7\u522b&#xff09;&#xff1b;<\/p>\n<\/li>\n<\/ul>\n<p>4&#xff09;\u4e00\u81f4\u6027&#xff1a;\u00a0\u7531\u524d\u4e09\u8005\u5171\u540c\u4fdd\u8bc1\u3002<\/p>\n<p>\u6700\u7ec8\u901a\u8fc7 Redo Log\u3001Undo Log\u3001\u9501\u3001MVCC \u56db\u8005\u534f\u540c&#xff0c;\u5728\u6027\u80fd\u4e0e\u6570\u636e\u5b89\u5168\u95f4\u53d6\u5f97\u5e73\u8861\u3002<\/p>\n<\/p>\n<p>\u62d3\u5c55&#xff1a;<\/p>\n<p>I.\u4e8b\u52a1\u6267\u884c\u5168\u6d41\u7a0b&#xff1a;<\/p>\n<p style=\"background-color:transparent\">1&#xff09;\u539f\u5b50\u6027&#xff08;Atomicity&#xff09;<\/p>\n<ul>\n<li>\n<p>Undo Log \u5b9e\u73b0\u56de\u6eda&#xff1a; \u6267\u884c\u00a0INSERT\/UPDATE\/DELETE\u00a0\u524d&#xff0c;\u5148\u5c06\u6570\u636e\u65e7\u7248\u672c\u5199\u5165 Undo Log\u3002\u82e5\u4e8b\u52a1\u5931\u8d25&#xff0c;\u5229\u7528 Undo Log \u53cd\u5411\u64cd\u4f5c\u6062\u590d\u6570\u636e\u3002<\/p>\n<\/li>\n<li>\n<p>\u4e24\u9636\u6bb5\u63d0\u4ea4&#xff08;2PC&#xff09;&#xff1a; \u8de8\u591a\u4e2a\u5f15\u64ce\u7684\u4e8b\u52a1&#xff08;\u5982 InnoDB &#043; binlog&#xff09;\u901a\u8fc7 2PC \u4fdd\u8bc1\u539f\u5b50\u6027&#xff08;\u5982\u00a0XA PREPARE\u00a0\u2192\u00a0XA COMMIT&#xff09;\u3002<\/p>\n<\/li>\n<\/ul>\n<p>2&#xff09;\u6301\u4e45\u6027&#xff08;Durability&#xff09;<\/p>\n<ul>\n<li>\n<p>Redo Log \u4f18\u5148\u5199\u76d8&#xff08;WAL \u673a\u5236&#xff09;&#xff1a; \u6570\u636e\u4fee\u6539\u524d&#xff0c;\u5148\u5199 Redo Log \u5230\u78c1\u76d8&#xff08;\u987a\u5e8f\u5199&#xff0c;\u6027\u80fd\u9ad8&#xff09;\u3002\u5373\u4f7f\u5d29\u6e83&#xff0c;\u91cd\u542f\u540e\u901a\u8fc7 Redo Log \u91cd\u653e\u6062\u590d\u6570\u636e\u3002<\/p>\n<\/li>\n<li>\n<p>\u5237\u76d8\u7b56\u7565&#xff1a;<\/p>\n<ul>\n<li>\n<p>innodb_flush_log_at_trx_commit&#061;1&#xff1a;\u6bcf\u6b21\u63d0\u4ea4\u5237\u76d8&#xff08;\u5f3a\u4e00\u81f4&#xff09;<\/p>\n<\/li>\n<li>\n<p>&#061;0\/2&#xff1a;\u5f02\u6b65\u5237\u76d8&#xff08;\u9ad8\u6027\u80fd&#xff0c;\u6709\u4e22\u6570\u636e\u98ce\u9669&#xff09;<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>3&#xff09;\u9694\u79bb\u6027&#xff08;Isolation&#xff09;<\/p>\n<ul>\n<li>\n<p>\u9501\u673a\u5236&#xff08;\u60b2\u89c2\u5e76\u53d1\u63a7\u5236&#xff09;&#xff1a;<\/p>\n<ul>\n<li>\n<p>\u884c\u7ea7\u9501&#xff1a;\u5199\u64cd\u4f5c\u52a0\u6392\u4ed6\u9501&#xff08;X Lock&#xff09;&#xff0c;\u963b\u585e\u5176\u4ed6\u5199\u64cd\u4f5c\u3002<\/p>\n<\/li>\n<li>\n<p>\u95f4\u9699\u9501&#xff08;Gap Lock&#xff09;\u00a0&#043;\u00a0\u4e34\u952e\u9501&#xff08;Next-Key Lock&#xff09;&#xff1a;\u89e3\u51b3\u5e7b\u8bfb&#xff08;RR \u9694\u79bb\u7ea7\u522b&#xff09;\u3002<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>MVCC&#xff08;\u4e50\u89c2\u5e76\u53d1\u63a7\u5236&#xff09;&#xff1a;<\/p>\n<ul>\n<li>\n<p>ReadView&#xff1a;\u4e8b\u52a1\u5f00\u542f\u65f6\u751f\u6210\u6d3b\u8dc3\u4e8b\u52a1 ID \u5feb\u7167\u3002<\/p>\n<\/li>\n<li>\n<p>\u7248\u672c\u94fe&#xff1a;\u6bcf\u884c\u6570\u636e\u9690\u85cf\u5b57\u6bb5&#xff08;DB_TRX_ID\u3001DB_ROLL_PTR&#xff09;\u6307\u5411 Undo Log \u4e2d\u7684\u5386\u53f2\u7248\u672c\u3002<\/p>\n<\/li>\n<li>\n<p>\u53ef\u89c1\u6027\u89c4\u5219&#xff1a;\u6839\u636e ReadView \u548c\u7248\u672c\u94fe\u51b3\u5b9a\u662f\u5426\u53ef\u89c1&#xff08;RC \u7ea7\u522b\u6bcf\u6b21\u8bfb\u751f\u6210\u65b0 ReadView&#xff0c;RR \u7ea7\u522b\u590d\u7528\u7b2c\u4e00\u6b21 ReadView&#xff09;\u3002<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>4&#xff09;\u4e00\u81f4\u6027&#xff08;Consistency&#xff09;<\/p>\n<ul>\n<li>\n<p>\u539f\u5b50\u6027 &#043; \u6301\u4e45\u6027 &#043; \u9694\u79bb\u6027\u5171\u540c\u4fdd\u969c\u6570\u636e\u903b\u8f91\u4e00\u81f4\u6027&#xff08;\u5982\u5916\u952e\u7ea6\u675f\u3001\u552f\u4e00\u7d22\u5f15&#xff09;\u3002<\/p>\n<\/li>\n<\/ul>\n<p>II.\u4e8b\u52a1\u64cd\u4f5c\u793a\u4f8b&#xff08;\u4ee5 UPDATE \u4e3a\u4f8b&#xff09;&#xff1a;<\/p>\n<li>\n<p>\u5f00\u542f\u4e8b\u52a1&#xff1a;BEGIN<\/p>\n<\/li>\n<li>\n<p>\u751f\u6210 ReadView&#xff08;RR \u7ea7\u522b&#xff09;<\/p>\n<\/li>\n<li>\n<p>\u6267\u884c UPDATE&#xff1a;<\/p>\n<ul>\n<li>\n<p>\u52a0\u884c\u9501&#xff08;X Lock&#xff09;\u53ca\u95f4\u9699\u9501<\/p>\n<\/li>\n<li>\n<p>\u5199 Undo Log&#xff08;\u8bb0\u5f55\u65e7\u503c&#xff09;<\/p>\n<\/li>\n<li>\n<p>\u5199 Redo Log&#xff08;Prepare \u72b6\u6001&#xff09;<\/p>\n<\/li>\n<li>\n<p>\u4fee\u6539 Buffer Pool \u6570\u636e\u9875<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>\u63d0\u4ea4\u4e8b\u52a1&#xff1a;COMMIT<\/p>\n<ul>\n<li>\n<p>Redo Log \u6807\u8bb0 Commit<\/p>\n<\/li>\n<li>\n<p>\u91ca\u653e\u9501<\/p>\n<\/li>\n<li>\n<p>Binlog \u5199\u5165&#xff08;\u4e3b\u4ece\u540c\u6b65&#xff09;<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>\u56de\u6eda\u4e8b\u52a1&#xff1a;ROLLBACK<\/p>\n<ul>\n<li>\n<p>\u7528 Undo Log \u6062\u590d\u6570\u636e<\/p>\n<\/li>\n<li>\n<p>\u91ca\u653e\u9501<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"830\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/07\/20250729182630-688912566cd35.png\" width=\"419\" \/><\/p>\n<\/p>\n<p>III.\u4e0d\u540c\u9694\u79bb\u7ea7\u522b\u7684\u5b9e\u73b0&#xff1a;<\/p>\n<table>\n<tr>\u9694\u79bb\u7ea7\u522b\u5b9e\u73b0\u673a\u5236\u95ee\u9898\u89e3\u51b3<\/tr>\n<tbody>\n<tr>\n<td>\u8bfb\u672a\u63d0\u4ea4&#xff08;RU&#xff09;<\/td>\n<td>\u4e0d\u52a0\u9501&#xff0c;\u76f4\u63a5\u8bfb\u6700\u65b0\u6570\u636e&#xff08;\u542b\u672a\u63d0\u4ea4\u4e8b\u52a1&#xff09;<\/td>\n<td>\u65e0<\/td>\n<\/tr>\n<tr>\n<td>\u8bfb\u5df2\u63d0\u4ea4&#xff08;RC&#xff09;<\/td>\n<td>MVCC \u6bcf\u6b21\u8bfb\u751f\u6210\u65b0\u00a0ReadView&#xff0c;\u8bfb\u5df2\u63d0\u4ea4\u7248\u672c<\/td>\n<td>\u810f\u8bfb<\/td>\n<\/tr>\n<tr>\n<td>\u53ef\u91cd\u590d\u8bfb&#xff08;RR&#xff09;<\/td>\n<td>MVCC \u9996\u6b21\u8bfb\u751f\u6210\u00a0ReadView&#xff0c;\u540e\u7eed\u590d\u7528 &#043; \u95f4\u9699\u9501<\/td>\n<td>\u810f\u8bfb\u3001\u4e0d\u53ef\u91cd\u590d\u8bfb\u3001\u5e7b\u8bfb<\/td>\n<\/tr>\n<tr>\n<td>\u4e32\u884c\u5316&#xff08;S&#xff09;<\/td>\n<td>\u8bfb\u52a0\u5171\u4eab\u9501&#xff0c;\u5199\u52a0\u6392\u4ed6\u9501&#xff08;\u5b8c\u5168\u4e32\u884c\u5316&#xff09;<\/td>\n<td>\u6240\u6709\u5e76\u53d1\u95ee\u9898<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2 id=\"6.MySQL%20%E4%BA%8B%E5%8A%A1%E7%9A%84%E4%BA%8C%E9%98%B6%E6%AE%B5%E6%8F%90%E4%BA%A4%E6%98%AF%E4%BB%80%E4%B9%88%EF%BC%9F%EF%BC%88%E4%B8%AD%EF%BC%89\" style=\"background-color:transparent\">6.MySQL \u4e8b\u52a1\u7684\u4e8c\u9636\u6bb5\u63d0\u4ea4\u662f\u4ec0\u4e48&#xff1f;&#xff08;\u4e2d&#xff09;<\/h2>\n<p>MySQL \u7684\u4e8c\u9636\u6bb5\u63d0\u4ea4\u662f\u534f\u8c03 redo log&#xff08;\u5b58\u50a8\u5f15\u64ce\u5c42&#xff09;\u548c binlog&#xff08;Server \u5c42&#xff09;\u7684\u6838\u5fc3\u673a\u5236&#xff1a; 1&#xff09;Prepare \u9636\u6bb5&#xff1a;\u00a0\u5199\u5165 prepare \u72b6\u6001\u7684 redo log&#xff0c;\u786e\u4fdd\u7269\u7406\u4fee\u6539\u6301\u4e45\u5316\u3002 2&#xff09;Commit \u9636\u6bb5&#xff1a;\u00a0\u5148\u5199 binlog&#xff08;\u903b\u8f91\u64cd\u4f5c&#xff09;&#xff0c;\u518d\u63d0\u4ea4 redo log&#xff08;\u6807\u8bb0 commit&#xff09;\u3002\u5d29\u6e83\u6062\u590d\u65f6&#xff0c;\u901a\u8fc7\u5bf9\u6bd4 redo log \u7684 prepare \u72b6\u6001\u548c binlog \u5b8c\u6574\u6027&#xff0c;\u51b3\u5b9a\u4e8b\u52a1\u63d0\u4ea4\u6216\u56de\u6eda&#xff0c;\u4ece\u800c\u4fdd\u969c\u8de8\u65e5\u5fd7\u7cfb\u7edf\u7684\u539f\u5b50\u6027\u4e0e\u6570\u636e\u4e00\u81f4\u6027\u3002<\/p>\n<\/p>\n<p>\u62d3\u5c55&#xff1a;<\/p>\n<p>I.\u6267\u884c\u6d41\u7a0b&#xff08;\u4ee5\u4e8b\u52a1\u63d0\u4ea4\u4e3a\u4f8b&#xff09;&#xff1a;<\/p>\n<p>1&#xff09;\u9636\u6bb5\u4e00&#xff1a;Prepare&#xff08;\u51c6\u5907\u9636\u6bb5&#xff09;<\/p>\n<li>\n<p>\u5199 redo log&#xff08;prepare \u72b6\u6001&#xff09;<\/p>\n<ul>\n<li>\n<p>InnoDB \u5c06\u4e8b\u52a1\u7684\u4fee\u6539\u5199\u5165 redo log&#xff0c;\u6807\u8bb0\u4e3a\u00a0PREPARE\u00a0\u72b6\u6001&#xff08;\u7269\u7406\u65e5\u5fd7&#xff0c;\u8bb0\u5f55\u6570\u636e\u9875\u53d8\u66f4&#xff09;\u3002<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>\u901a\u77e5\u6267\u884c\u5668<\/p>\n<ul>\n<li>\n<p>\u5b58\u50a8\u5f15\u64ce\u901a\u77e5\u6267\u884c\u5668&#xff1a;\u201c\u5df2\u51c6\u5907\u597d\u63d0\u4ea4\u201d\u3002<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<p>2&#xff09;\u9636\u6bb5\u4e8c&#xff1a;Commit&#xff08;\u63d0\u4ea4\u9636\u6bb5&#xff09;<\/p>\n<li>\n<p>\u5199 binlog<\/p>\n<ul>\n<li>\n<p>\u6267\u884c\u5668\u5c06\u4e8b\u52a1\u7684 SQL \u64cd\u4f5c\u903b\u8f91\u5199\u5165 binlog&#xff08;\u903b\u8f91\u65e5\u5fd7&#xff0c;\u8bb0\u5f55 SQL \u8bed\u53e5&#xff09;\u3002<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>\u5199 redo log&#xff08;commit \u72b6\u6001&#xff09;<\/p>\n<ul>\n<li>\n<p>\u6267\u884c\u5668\u901a\u77e5 InnoDB \u63d0\u4ea4\u4e8b\u52a1&#xff0c;redo log \u6807\u8bb0\u4e3a\u00a0COMMIT\u00a0\u72b6\u6001\u3002<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>\u91ca\u653e\u8d44\u6e90<\/p>\n<ul>\n<li>\n<p>\u91ca\u653e\u4e8b\u52a1\u6301\u6709\u7684\u9501&#xff0c;\u6e05\u7406 Undo Log\u3002<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<p>\u6ce8\u610f&#xff1a;<\/p>\n<ul>\n<li>\n<p>binlog \u5199\u5165\u5fc5\u987b\u5728 redo log \u7684 prepare \u4e4b\u540e\u3001commit \u4e4b\u524d\u3002<\/p>\n<\/li>\n<li>\n<p>\u82e5\u4efb\u4e00\u9636\u6bb5\u5931\u8d25&#xff0c;\u4e8b\u52a1\u4f1a\u56de\u6eda&#xff08;\u5229\u7528 Undo Log \u6062\u590d\u6570\u636e&#xff09;\u3002<\/p>\n<\/li>\n<\/ul>\n<p>II.\u5d29\u6e83\u6062\u590d\u65f6\u7684\u5904\u7406\u903b\u8f91&#xff1a;<\/p>\n<p>MySQL \u91cd\u542f\u540e\u68c0\u67e5 redo log \u548c binlog \u72b6\u6001&#xff1a;<\/p>\n<table>\n<tr>\u573a\u666f\u5904\u7406\u65b9\u5f0f<\/tr>\n<tbody>\n<tr>\n<td>redo log \u6709 commit \u6807\u8bb0<\/td>\n<td>\u4e8b\u52a1\u5df2\u63d0\u4ea4&#xff0c;\u65e0\u9700\u5904\u7406<\/td>\n<\/tr>\n<tr>\n<td>redo log \u6709 prepare \u6807\u8bb0<\/td>\n<td>\u68c0\u67e5 binlog \u662f\u5426\u5b8c\u6574&#xff1a;<\/td>\n<\/tr>\n<tr>\n<td>&#8211; binlog\u00a0\u5b8c\u6574\u5b58\u5728<\/td>\n<td>\u91cd\u505a commit&#xff08;\u63d0\u4ea4\u4e8b\u52a1&#xff09;<\/td>\n<\/tr>\n<tr>\n<td>&#8211; binlog\u00a0\u4e0d\u5b8c\u6574\/\u4e22\u5931<\/td>\n<td>\u56de\u6eda\u4e8b\u52a1&#xff08;\u5229\u7528 Undo Log&#xff09;<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2 id=\"7.MySQL%20%E4%B8%AD%E9%95%BF%E4%BA%8B%E5%8A%A1%E5%8F%AF%E8%83%BD%E4%BC%9A%E5%AF%BC%E8%87%B4%E5%93%AA%E4%BA%9B%E9%97%AE%E9%A2%98%EF%BC%9F%C2%A0%C2%A0%20%C2%A0%EF%BC%88%E4%B8%AD%EF%BC%89\" style=\"background-color:transparent\">7.MySQL \u4e2d\u957f\u4e8b\u52a1\u53ef\u80fd\u4f1a\u5bfc\u81f4\u54ea\u4e9b\u95ee\u9898&#xff1f;\u00a0\u00a0 \u00a0&#xff08;\u4e2d&#xff09;<\/h2>\n<p>MySQL \u957f\u4e8b\u52a1\u4f1a\u5f15\u53d1\u56db\u7c7b\u6838\u5fc3\u95ee\u9898&#xff1a;<\/p>\n<p>1&#xff09;\u9501\u963b\u585e\u4e0e\u6b7b\u9501&#xff1a;\u957f\u671f\u5360\u7528\u884c\u9501\/\u95f4\u9699\u9501&#xff0c;\u5bfc\u81f4\u5e76\u53d1\u4e8b\u52a1\u963b\u585e\u751a\u81f3\u6b7b\u9501\u3002<\/p>\n<p>2&#xff09;Undo Log \u81a8\u80c0&#xff1a;\u963b\u6b62 Purge \u7ebf\u7a0b\u6e05\u7406\u65e7\u7248\u672c&#xff0c;\u5f15\u53d1\u5b58\u50a8\u7a7a\u95f4\u7206\u70b8\u3002<\/p>\n<p>3&#xff09;\u4e3b\u4ece\u590d\u5236\u5ef6\u8fdf&#xff1a;Binlog \u5199\u5165\u6ede\u540e&#xff0c;\u4e3b\u4ece\u6570\u636e\u4e0d\u4e00\u81f4\u3002<\/p>\n<p>4&#xff09;\u8fde\u63a5\u8d44\u6e90\u8017\u5c3d&#xff1a;\u6301\u7eed\u5360\u7528\u7ebf\u7a0b\u4e0e\u5185\u5b58\u8d44\u6e90&#xff0c;\u89e6\u53d1\u8fde\u63a5\u6c60\u6ea2\u51fa\u3002<\/p>\n<p>\u89e3\u51b3\u9700\u4ece\u76d1\u63a7&#xff08;INNODB_TRX&#xff09;\u3001\u62c6\u89e3\u4e8b\u52a1\u3001\u8bbe\u7f6e\u8d85\u65f6\u53c2\u6570\u4e09\u65b9\u9762\u5165\u624b&#xff0c;\u672c\u8d28\u662f\u907f\u514d\u4e8b\u52a1\u957f\u65f6\u95f4\u4e0d\u63d0\u4ea4\u3002<\/p>\n<\/p>\n<p>\u62d3\u5c55&#xff1a;<\/p>\n<p>I.\u5177\u4f53\u95ee\u9898&#xff1a;<\/p>\n<p>1&#xff09;\u9501\u963b\u585e\u4e0e\u6b7b\u9501<\/p>\n<ul>\n<li>\n<p>\u884c\u9501\/\u95f4\u9699\u9501\u957f\u671f\u6301\u6709&#xff1a; \u672a\u63d0\u4ea4\u7684\u4e8b\u52a1\u6301\u7eed\u5360\u7528\u9501\u8d44\u6e90&#xff0c;\u5bfc\u81f4\u5176\u4ed6\u4e8b\u52a1\u963b\u585e&#xff08;\u5982\u00a0UPDATE\u00a0\u88ab\u5361\u4f4f&#xff09;&#xff0c;\u9ad8\u5e76\u53d1\u4e0b\u89e6\u53d1\u6b7b\u9501\u6982\u7387\u98d9\u5347\u3002<\/p>\n<\/li>\n<li>\n<p>\u793a\u4f8b&#xff1a;\u4e8b\u52a1 A \u66f4\u65b0 10 \u4e07\u884c\u672a\u63d0\u4ea4 \u2192 \u4e8b\u52a1 B \u66f4\u65b0\u540c\u4e00\u884c\u65f6\u65e0\u9650\u7b49\u5f85\u3002<\/p>\n<\/li>\n<\/ul>\n<p>2&#xff09;Undo Log \u81a8\u80c0<\/p>\n<ul>\n<li>\n<p>\u5386\u53f2\u7248\u672c\u65e0\u6cd5\u6e05\u7406&#xff1a; MVCC \u4f9d\u8d56 Undo Log \u5b58\u50a8\u65e7\u6570\u636e\u7248\u672c&#xff0c;\u957f\u4e8b\u52a1\u5bfc\u81f4 Purge \u7ebf\u7a0b\u65e0\u6cd5\u6e05\u7406\u5176\u5f00\u59cb\u524d\u7684\u65e7\u7248\u672c&#xff08;\u56e0\u5feb\u7167\u8bfb\u4ecd\u9700\u8bbf\u95ee&#xff09;\u3002<\/p>\n<\/li>\n<li>\n<p>\u540e\u679c&#xff1a;Undo \u8868\u7a7a\u95f4\u6301\u7eed\u589e\u957f&#xff0c;\u751a\u81f3\u6491\u7206\u78c1\u76d8&#xff08;\u9519\u8bef\u00a0The total number of locks exceeds the lock table size&#xff09;\u3002<\/p>\n<\/li>\n<\/ul>\n<p>3&#xff09;\u4e3b\u4ece\u590d\u5236\u5ef6\u8fdf<\/p>\n<ul>\n<li>\n<p>Binlog \u79ef\u538b&#xff1a; \u4e3b\u5e93\u672a\u63d0\u4ea4\u7684\u4e8b\u52a1\u4f1a\u5ef6\u8fdf Binlog \u5199\u5165&#xff08;\u4e8b\u52a1\u63d0\u4ea4\u624d\u5199 Binlog&#xff09;&#xff0c;\u4ece\u5e93\u540c\u6b65\u6ede\u540e&#xff0c;\u5bfc\u81f4\u8bfb\u5199\u5206\u79bb\u65f6\u8bfb\u5230\u65e7\u6570\u636e\u3002<\/p>\n<\/li>\n<\/ul>\n<p>4&#xff09;\u8fde\u63a5\u8d44\u6e90\u8017\u5c3d<\/p>\n<ul>\n<li>\n<p>\u957f\u671f\u5360\u7528\u8fde\u63a5&#xff1a; \u6bcf\u4e2a\u4e8b\u52a1\u5360\u7528\u4e00\u4e2a\u6570\u636e\u5e93\u8fde\u63a5&#xff08;\u7ebf\u7a0b &#043; \u5185\u5b58&#xff09;&#xff0c;\u957f\u4e8b\u52a1\u4f7f\u8fde\u63a5\u6c60\u5feb\u901f\u8017\u5c3d&#xff08;Too many connections&#xff09;&#xff0c;\u65b0\u8bf7\u6c42\u88ab\u62d2\u7edd\u3002<\/p>\n<\/li>\n<\/ul>\n<p>5&#xff09;\u6570\u636e\u903b\u8f91\u9519\u8bef\u98ce\u9669<\/p>\n<ul>\n<li>\n<p>\u65e7\u5feb\u7167\u8bfb\u5931\u771f&#xff1a; RR \u7ea7\u522b\u4e0b&#xff0c;\u957f\u4e8b\u52a1\u7684 ReadView \u957f\u671f\u4e0d\u66f4\u65b0&#xff0c;\u53ef\u80fd\u8bfb\u5230\u5df2\u88ab\u7269\u7406\u5220\u9664\u7684\u201c\u5e7d\u7075\u6570\u636e\u201d&#xff08;\u903b\u8f91\u4e0a\u5df2\u5931\u6548&#xff09;\u3002<\/p>\n<\/li>\n<\/ul>\n<p>II.\u89e3\u51b3\u65b9\u6848&#xff1a;<\/p>\n<li>\n<p>\u76d1\u63a7\u4e0e\u544a\u8b66&#xff1a;<\/p>\n<p> SELECT * FROM information_schema.INNODB_TRX; &#8212; \u67e5\u8fd0\u884c\u4e2d\u4e8b\u52a1 <\/p>\n<p>\u76d1\u63a7\u00a0trx_duration&#xff08;\u4e8b\u52a1\u6301\u7eed\u65f6\u95f4&#xff09;&#xff0c;\u8d85\u8fc7\u9608\u503c\u62a5\u8b66&#xff08;\u5982 60 \u79d2&#xff09;\u3002<\/p>\n<\/li>\n<li>\n<p>\u81ea\u52a8 Kill \u957f\u4e8b\u52a1&#xff1a; \u901a\u8fc7\u811a\u672c\u5b9a\u671f\u6e05\u7406\u8d85\u65f6\u4e8b\u52a1&#xff08;KILL trx_mysql_thread_id&#xff09;\u3002<\/p>\n<\/li>\n<li>\n<p>\u62c6\u89e3\u5927\u4e8b\u52a1&#xff1a;<\/p>\n<li>\n<p>\u5206\u6279\u6b21\u63d0\u4ea4&#xff08;\u5982 1000 \u884c\/\u6b21&#xff09;&#xff1a;<\/p>\n<p> UPDATE table SET col&#061;val WHERE id BETWEEN 1 AND 1000;<br \/>\nCOMMIT; &#8212; \u5206\u6279\u63d0\u4ea4 <\/li>\n<\/li>\n<li>\n<p>\u8bbe\u7f6e\u8d85\u65f6\u53c2\u6570&#xff1a;<\/p>\n<p> innodb_lock_wait_timeout&#061;50      &#8212; \u9501\u7b49\u5f85\u8d85\u65f6&#xff08;\u79d2&#xff09;<br \/>\ninnodb_rollback_on_timeout&#061;ON    &#8212; \u8d85\u65f6\u81ea\u52a8\u56de\u6eda <\/p>\n<\/li>\n<h2 id=\"8.MySQL%20%E4%B8%AD%E7%9A%84%20MVCC%20%E6%98%AF%E4%BB%80%E4%B9%88%EF%BC%9F%EF%BC%88%E9%9A%BE%EF%BC%89\" style=\"background-color:transparent\">8.MySQL \u4e2d\u7684 MVCC \u662f\u4ec0\u4e48&#xff1f;&#xff08;\u96be&#xff09;<\/h2>\n<p>MySQL \u7684 MVCC&#xff08;Multi-Version Concurrency Control&#xff0c;\u591a\u7248\u672c\u5e76\u53d1\u63a7\u5236&#xff09; \u662f\u901a\u8fc7\u6570\u636e\u591a\u7248\u672c\u548c\u5feb\u7167\u8bfb\u5b9e\u73b0\u7684\u65e0\u9501\u5e76\u53d1\u63a7\u5236\u673a\u5236&#xff1a;<\/p>\n<p>1&#xff09;\u6838\u5fc3\u7ed3\u6784&#xff1a;\u00a0\u6bcf\u884c\u6570\u636e\u9690\u85cf\u4e8b\u52a1 ID&#xff08;DB_TRX_ID&#xff09;\u548c\u56de\u6eda\u6307\u9488&#xff08;DB_ROLL_PTR&#xff09;&#xff0c;\u901a\u8fc7 Undo Log \u6784\u5efa\u7248\u672c\u94fe\u3002<\/p>\n<p>2&#xff09;\u53ef\u89c1\u6027\u63a7\u5236&#xff1a;\u00a0\u4e8b\u52a1\u8bfb\u64cd\u4f5c\u65f6\u751f\u6210 ReadView&#xff0c;\u57fa\u4e8e\u4e8b\u52a1 ID \u548c\u6d3b\u8dc3\u4e8b\u52a1\u5217\u8868\u5224\u65ad\u7248\u672c\u53ef\u89c1\u6027\u3002<\/p>\n<p>3&#xff09;\u9694\u79bb\u7ea7\u522b\u9002\u914d&#xff1a;<\/p>\n<ul>\n<li>\n<p>RR \u7ea7\u522b&#xff1a;\u9996\u6b21\u8bfb\u751f\u6210 ReadView \u5e76\u590d\u7528&#xff0c;\u89e3\u51b3\u4e0d\u53ef\u91cd\u590d\u8bfb\u3002<\/p>\n<\/li>\n<li>RC \u7ea7\u522b&#xff1a;\u6bcf\u6b21\u8bfb\u751f\u6210\u65b0 ReadView&#xff0c;\u89e3\u51b3\u810f\u8bfb\u4f46\u5141\u8bb8\u4e0d\u53ef\u91cd\u590d\u8bfb\u3002<\/li>\n<\/ul>\n<p>4&#xff09;\u4f18\u52bf&#xff1a;\u00a0\u5728\u4fdd\u8bc1\u9694\u79bb\u6027\u7684\u540c\u65f6&#xff0c;\u663e\u8457\u63d0\u5347\u8bfb\u5199\u5e76\u53d1\u6027\u80fd\u3002<\/p>\n<\/p>\n<p>\u62d3\u5c55&#xff1a;<\/p>\n<p>I.\u5b9e\u73b0\u539f\u7406&#xff1a;<\/p>\n<p>1&#xff09;\u9690\u85cf\u5b57\u6bb5&#xff08;\u6bcf\u884c\u6570\u636e\u5305\u542b&#xff09;<\/p>\n<ul>\n<li>\n<p>DB_TRX_ID&#xff08;6 \u5b57\u8282&#xff09;&#xff1a;\u6700\u8fd1\u4fee\u6539\u8be5\u884c\u7684\u4e8b\u52a1 ID&#xff08;\u63d2\u5165\/\u66f4\u65b0\u65f6\u5199\u5165&#xff09;\u3002<\/p>\n<\/li>\n<li>\n<p>DB_ROLL_PTR&#xff08;7 \u5b57\u8282&#xff09;&#xff1a;\u56de\u6eda\u6307\u9488&#xff0c;\u6307\u5411 Undo Log \u4e2d\u7684\u5386\u53f2\u7248\u672c\u94fe\u3002<\/p>\n<\/li>\n<li>\n<p>DB_ROW_ID&#xff08;6 \u5b57\u8282&#xff09;&#xff1a;\u9690\u542b\u81ea\u589e\u884c ID&#xff08;\u65e0\u4e3b\u952e\u65f6\u751f\u6210\u805a\u7c07\u7d22\u5f15&#xff09;\u3002<\/p>\n<\/li>\n<\/ul>\n<p>2&#xff09;Undo Log&#xff08;\u7248\u672c\u94fe\u5b58\u50a8&#xff09;<\/p>\n<ul>\n<li>\n<p>\u6bcf\u6b21\u66f4\u65b0\u6570\u636e\u65f6&#xff0c;\u5c06\u65e7\u6570\u636e\u62f7\u8d1d\u5230 Undo Log \u4e2d&#xff0c;\u5e76\u901a\u8fc7\u00a0DB_ROLL_PTR\u00a0\u8fde\u63a5\u6210\u5355\u5411\u94fe\u8868&#xff08;\u7248\u672c\u94fe&#xff09;\u3002<\/p>\n<\/li>\n<li>\n<p>\u793a\u4f8b&#xff1a;<\/p>\n<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"243\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/07\/20250729182630-6889125684d12.png\" width=\"1089\" \/><\/p>\n<p>3&#xff09;ReadView&#xff08;\u53ef\u89c1\u6027\u5224\u65ad\u89c4\u5219&#xff09;<\/p>\n<p>\u4e8b\u52a1\u9996\u6b21\u6267\u884c\u00a0SELECT\u00a0\u65f6\u751f\u6210 ReadView&#xff0c;\u5305\u542b&#xff1a;<\/p>\n<ul>\n<li>\n<p>trx_ids&#xff1a;\u5f53\u524d\u6d3b\u8dc3\u4e8b\u52a1 ID \u5217\u8868&#xff08;\u672a\u63d0\u4ea4\u7684\u4e8b\u52a1&#xff09;\u3002<\/p>\n<\/li>\n<li>\n<p>min_trx_id&#xff1a;trx_ids\u00a0\u4e2d\u7684\u6700\u5c0f\u4e8b\u52a1 ID\u3002<\/p>\n<\/li>\n<li>\n<p>max_trx_id&#xff1a;\u7cfb\u7edf\u9884\u5206\u914d\u7684\u4e0b\u4e00\u4e2a\u4e8b\u52a1 ID&#xff08;\u5f53\u524d\u6700\u5927\u4e8b\u52a1 ID &#043;1&#xff09;\u3002<\/p>\n<\/li>\n<li>\n<p>creator_trx_id&#xff1a;\u521b\u5efa\u8be5 ReadView \u7684\u4e8b\u52a1 ID\u3002<\/p>\n<\/li>\n<\/ul>\n<p>4&#xff09;\u53ef\u89c1\u6027\u89c4\u5219&#xff08;\u5224\u65ad\u6570\u636e\u662f\u5426\u53ef\u89c1&#xff09;<\/p>\n<p>\u5bf9\u7248\u672c\u94fe\u4e2d\u6bcf\u4e2a\u6570\u636e\u7248\u672c&#xff0c;\u6309\u987a\u5e8f\u68c0\u67e5&#xff1a;<\/p>\n<li>\n<p>\u82e5\u00a0DB_TRX_ID &#061;&#061; creator_trx_id\u00a0\u2192\u00a0\u53ef\u89c1&#xff08;\u5f53\u524d\u4e8b\u52a1\u81ea\u8eab\u4fee\u6539&#xff09;&#xff1b;<\/p>\n<\/li>\n<li>\n<p>\u82e5\u00a0DB_TRX_ID &lt; min_trx_id\u00a0\u2192\u00a0\u53ef\u89c1&#xff08;\u4e8b\u52a1\u5df2\u63d0\u4ea4&#xff09;&#xff1b;<\/p>\n<\/li>\n<li>\n<p>\u82e5\u00a0DB_TRX_ID &gt; max_trx_id\u00a0\u2192\u00a0\u4e0d\u53ef\u89c1&#xff08;\u4e8b\u52a1\u5728 ReadView \u540e\u5f00\u542f&#xff09;&#xff1b;<\/p>\n<\/li>\n<li>\n<p>\u82e5\u00a0DB_TRX_ID\u00a0\u5728\u00a0trx_ids\u00a0\u4e2d \u2192\u00a0\u4e0d\u53ef\u89c1&#xff08;\u4e8b\u52a1\u672a\u63d0\u4ea4&#xff09;&#xff1b;<\/p>\n<\/li>\n<li>\n<p>\u5426\u5219 \u2192\u00a0\u53ef\u89c1\u3002<\/p>\n<\/li>\n<p>II.MVCC \u5de5\u4f5c\u6d41\u7a0b\u793a\u4f8b&#xff08;RR \u7ea7\u522b&#xff09;&#xff1a;<\/p>\n<p>\u5047\u8bbe\u4e8b\u52a1 A&#xff08;ID&#061;100&#xff09;\u6267\u884c\u00a0SELECT * FROM users WHERE id&#061;1&#xff1a;<\/p>\n<li>\n<p>\u751f\u6210 ReadView&#xff1a;trx_ids&#061;[99,101]&#xff08;\u6d3b\u8dc3\u4e8b\u52a1&#xff09;&#xff0c;min_trx_id&#061;99&#xff0c;max_trx_id&#061;102\u3002<\/p>\n<\/li>\n<li>\n<p>\u8bfb\u53d6\u00a0id&#061;1\u00a0\u7684\u6570\u636e\u884c&#xff0c;\u53d1\u73b0\u5176\u00a0DB_TRX_ID&#061;101&#xff08;\u5728\u00a0trx_ids\u00a0\u4e2d&#xff09;\u2192\u00a0\u4e0d\u53ef\u89c1\u3002<\/p>\n<\/li>\n<li>\n<p>\u6cbf\u56de\u6eda\u6307\u9488\u627e\u5230\u65e7\u7248\u672c&#xff1a;DB_TRX_ID&#061;98&#xff08;\u5c0f\u4e8e\u00a0min_trx_id&#061;99&#xff09;\u2192\u00a0\u53ef\u89c1&#xff0c;\u8fd4\u56de\u8be5\u7248\u672c\u6570\u636e\u3002<\/p>\n<\/li>\n<h2 id=\"9.MySQL%20%E4%B8%AD%E7%9A%84%E4%BA%8B%E5%8A%A1%E9%9A%94%E7%A6%BB%E7%BA%A7%E5%88%AB%E6%9C%89%E5%93%AA%E4%BA%9B%EF%BC%9F%EF%BC%88%E6%98%93%EF%BC%89\" style=\"background-color:transparent\">9.MySQL \u4e2d\u7684\u4e8b\u52a1\u9694\u79bb\u7ea7\u522b\u6709\u54ea\u4e9b&#xff1f;&#xff08;\u6613&#xff09;<\/h2>\n<p>MySQL \u63d0\u4f9b\u56db\u79cd\u6807\u51c6\u4e8b\u52a1\u9694\u79bb\u7ea7\u522b&#xff0c;\u7528\u4e8e\u5e73\u8861\u6570\u636e\u4e00\u81f4\u6027\u4e0e\u5e76\u53d1\u6027\u80fd\u3002<\/p>\n<p>\u4e8b\u52a1\u9694\u79bb\u7ea7\u522b\u4ece\u4f4e\u5230\u9ad8&#xff1a;<\/p>\n<p>1&#xff09;\u8bfb\u672a\u63d0\u4ea4&#xff08;RU&#xff09;&#xff1a;\u00a0\u53ef\u80fd\u8bfb\u5230\u672a\u63d0\u4ea4\u6570\u636e&#xff0c;\u5b58\u5728\u810f\u8bfb\u3001\u4e0d\u53ef\u91cd\u590d\u8bfb\u3001\u5e7b\u8bfb&#xff1b; 2&#xff09;\u8bfb\u5df2\u63d0\u4ea4&#xff08;RC&#xff09;&#xff1a;\u00a0\u907f\u514d\u810f\u8bfb&#xff0c;\u4f46\u5b58\u5728\u4e0d\u53ef\u91cd\u590d\u8bfb\u548c\u5e7b\u8bfb&#xff08;\u6bcf\u6b21\u8bfb\u751f\u6210\u65b0 ReadView&#xff09;&#xff1b; 3&#xff09;\u53ef\u91cd\u590d\u8bfb&#xff08;RR&#xff0c;\u9ed8\u8ba4&#xff09;&#xff1a;\u00a0\u907f\u514d\u810f\u8bfb\u548c\u4e0d\u53ef\u91cd\u590d\u8bfb&#xff0c;\u5e76\u901a\u8fc7 MVCC&#xff08;\u9996\u6b21\u8bfb ReadView&#xff09; &#043; \u95f4\u9699\u9501 \u89e3\u51b3\u5e7b\u8bfb&#xff1b; 4&#xff09;\u4e32\u884c\u5316&#xff08;S&#xff09;&#xff1a;\u00a0\u5b8c\u5168\u4e32\u884c\u6267\u884c&#xff0c;\u907f\u514d\u6240\u6709\u5e76\u53d1\u95ee\u9898\u4f46\u6027\u80fd\u6700\u4f4e\u3002<\/p>\n<\/p>\n<table>\n<tr>\u9694\u79bb\u7ea7\u522b\u810f\u8bfb&#xff08;Dirty Read&#xff09;\u4e0d\u53ef\u91cd\u590d\u8bfb&#xff08;Non-Repeatable Read&#xff09;\u5e7b\u8bfb&#xff08;Phantom Read&#xff09;\u5b9e\u73b0\u673a\u5236<\/tr>\n<tbody>\n<tr>\n<td>\u8bfb\u672a\u63d0\u4ea4&#xff08;RU&#xff09;<\/td>\n<td>\u274c \u53ef\u80fd\u53d1\u751f<\/td>\n<td>\u274c \u53ef\u80fd\u53d1\u751f<\/td>\n<td>\u274c \u53ef\u80fd\u53d1\u751f<\/td>\n<td>\u76f4\u63a5\u8bfb\u53d6\u6700\u65b0\u6570\u636e&#xff08;\u65e0 MVCC&#xff0c;\u65e0\u9501\u963b\u585e\u8bfb&#xff09;<\/td>\n<\/tr>\n<tr>\n<td>\u8bfb\u5df2\u63d0\u4ea4&#xff08;RC&#xff09;<\/td>\n<td>\u2705 \u907f\u514d<\/td>\n<td>\u274c \u53ef\u80fd\u53d1\u751f<\/td>\n<td>\u274c \u53ef\u80fd\u53d1\u751f<\/td>\n<td>MVCC&#xff1a;\u6bcf\u6b21\u8bfb\u751f\u6210\u65b0 ReadView&#xff08;\u4ec5\u8bfb\u53d6\u5df2\u63d0\u4ea4\u7248\u672c&#xff09;<\/td>\n<\/tr>\n<tr>\n<td>\u53ef\u91cd\u590d\u8bfb&#xff08;RR&#xff09;\u00a0&#x1f539;<\/td>\n<td>\u2705 \u907f\u514d<\/td>\n<td>\u2705 \u907f\u514d<\/td>\n<td>\u2705 \u907f\u514d&#xff08;InnoDB \u7279\u8c03&#xff09;<\/td>\n<td>MVCC&#xff1a;\u9996\u6b21\u8bfb\u751f\u6210 ReadView\u00a0&#043;\u00a0\u95f4\u9699\u9501&#xff08;Gap Lock&#xff09;\u00a0\u963b\u6b62\u63d2\u5165\/\u5220\u9664<\/td>\n<\/tr>\n<tr>\n<td>\u4e32\u884c\u5316&#xff08;S&#xff09;<\/td>\n<td>\u2705 \u907f\u514d<\/td>\n<td>\u2705 \u907f\u514d<\/td>\n<td>\u2705 \u907f\u514d<\/td>\n<td>\u8bfb\u64cd\u4f5c\u9690\u5f0f\u52a0\u5171\u4eab\u9501&#xff08;S Lock&#xff09;&#xff0c;\u5199\u64cd\u4f5c\u52a0\u6392\u4ed6\u9501&#xff08;X Lock&#xff09;&#xff0c;\u8bfb\u5199\u4e92\u65a5<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2 id=\"10.MySQL%20%E9%BB%98%E8%AE%A4%E7%9A%84%E4%BA%8B%E5%8A%A1%E9%9A%94%E7%A6%BB%E7%BA%A7%E5%88%AB%E6%98%AF%E4%BB%80%E4%B9%88%EF%BC%9F%E4%B8%BA%E4%BB%80%E4%B9%88%E9%80%89%E6%8B%A9%E8%BF%99%E4%B8%AA%E7%BA%A7%E5%88%AB%EF%BC%9F%EF%BC%88%E6%98%93%EF%BC%89\">10.MySQL \u9ed8\u8ba4\u7684\u4e8b\u52a1\u9694\u79bb\u7ea7\u522b\u662f\u4ec0\u4e48&#xff1f;\u4e3a\u4ec0\u4e48\u9009\u62e9\u8fd9\u4e2a\u7ea7\u522b&#xff1f;&#xff08;\u6613&#xff09;<\/h2>\n<p>MySQL \u9ed8\u8ba4\u4e8b\u52a1\u9694\u79bb\u7ea7\u522b\u662f RR&#xff08;\u53ef\u91cd\u590d\u8bfb&#xff09;\u3002\u9009\u62e9 RR \u7684\u539f\u56e0\u662f&#xff1a; 1&#xff09;\u6027\u80fd\u5c42\u9762&#xff1a;\u00a0\u901a\u8fc7 MVCC \u5b9e\u73b0\u975e\u963b\u585e\u5feb\u7167\u8bfb&#xff0c;\u907f\u514d\u91cd\u590d\u751f\u6210 ReadView \u7684\u5f00\u9500&#xff0c;\u9002\u5408\u9ad8\u5e76\u53d1\u8bfb\u573a\u666f\u3002 2&#xff09;\u4e00\u81f4\u6027\u5c42\u9762&#xff1a;\u00a0\u5929\u7136\u89e3\u51b3\u4e0d\u53ef\u91cd\u590d\u8bfb&#xff0c;\u5e76\u901a\u8fc7\u95f4\u9699\u9501\u6291\u5236\u5e7b\u8bfb&#xff0c;\u6ee1\u8db3\u591a\u6570\u4e1a\u52a1\u5bf9\u6570\u636e\u4e00\u81f4\u6027\u7684\u8981\u6c42\u3002 3&#xff09;\u5bf9\u6bd4\u4f18\u52bf&#xff1a;\u00a0\u5728\u907f\u514d\u810f\u8bfb\u7684\u524d\u63d0\u4e0b&#xff0c;\u6bd4\u4e32\u884c\u5316&#xff08;S&#xff09;\u5e76\u53d1\u5ea6\u9ad8&#xff0c;\u6bd4\u8bfb\u5df2\u63d0\u4ea4&#xff08;RC&#xff09;\u6570\u636e\u4e00\u81f4\u6027\u66f4\u5f3a\u3002 \u8fd9\u662f InnoDB \u5728\u6027\u80fd\u4e0e\u6570\u636e\u5b89\u5168\u95f4\u6743\u8861\u540e\u7684\u6700\u4f18\u89e3\u3002<\/p>\n<\/p>\n<p>\u62d3\u5c55&#xff1a;<\/p>\n<p>I.\u4e3a\u4ec0\u4e48\u9009\u62e9 RR \u4f5c\u4e3a\u9ed8\u8ba4\u9694\u79bb\u7ea7\u522b&#xff1f;&#xff08;\u8be6\u7ec6\u89e3\u91ca&#xff09;<\/p>\n<p>1&#xff09;\u9ad8\u5e76\u53d1\u8bfb\u573a\u666f\u7684\u6027\u80fd\u4f18\u52bf<\/p>\n<ul>\n<li>\n<p>MVCC&#xff08;\u591a\u7248\u672c\u5e76\u53d1\u63a7\u5236&#xff09;&#xff1a; RR \u7ea7\u522b\u4e0b&#xff0c;\u4e8b\u52a1\u9996\u6b21\u8bfb\u751f\u6210\u00a0ReadView&#xff08;\u5feb\u7167&#xff09;&#xff0c;\u540e\u7eed\u8bfb\u64cd\u4f5c\u590d\u7528\u8be5\u89c6\u56fe&#xff0c;\u907f\u514d\u91cd\u590d\u521b\u5efa\u5feb\u7167\u7684\u5f00\u9500\u3002<\/p>\n<\/li>\n<li>\n<p>\u975e\u963b\u585e\u8bfb&#xff1a; \u8bfb\u64cd\u4f5c\u4e0d\u963b\u585e\u5199\u64cd\u4f5c&#xff08;\u5199\u64cd\u4f5c\u901a\u8fc7\u884c\u9501\u63a7\u5236&#xff09;&#xff0c;\u663e\u8457\u63d0\u5347\u8bfb\u591a\u5199\u5c11\u573a\u666f\u7684\u5e76\u53d1\u6027\u80fd\u3002<\/p>\n<\/li>\n<\/ul>\n<p>2&#xff09;\u89e3\u51b3\u4e0d\u53ef\u91cd\u590d\u8bfb\u4e0e\u5e7b\u8bfb&#xff08;\u5b9e\u9645\u4e1a\u52a1\u5f3a\u9700\u6c42&#xff09;<\/p>\n<ul>\n<li>\n<p>\u907f\u514d\u4e0d\u53ef\u91cd\u590d\u8bfb&#xff1a;\u540c\u4e00\u4e8b\u52a1\u5185\u591a\u6b21\u8bfb\u76f8\u540c\u6570\u636e&#xff0c;\u7ed3\u679c\u4e00\u81f4&#xff08;\u4f8b\u5982&#xff1a;\u4f59\u989d\u6821\u9a8c\u3001\u8ba2\u5355\u72b6\u6001\u786e\u8ba4&#xff09;\u3002<\/p>\n<\/li>\n<li>\n<p>\u6291\u5236\u5e7b\u8bfb&#xff1a;\u901a\u8fc7\u00a0\u95f4\u9699\u9501&#xff08;Gap Lock&#xff09;\u00a0\u9501\u5b9a\u67e5\u8be2\u8303\u56f4&#xff0c;\u963b\u6b62\u5176\u4ed6\u4e8b\u52a1\u63d2\u5165\u65b0\u6570\u636e&#xff08;\u5982\u00a0WHERE age &gt; 20\u00a0\u4f1a\u9501\u5b9a\u00a0age&gt;20\u00a0\u7684\u95f4\u9699&#xff09;\u3002<\/p>\n<\/li>\n<\/ul>\n<p>3&#xff09;\u5bf9\u6bd4\u5176\u4ed6\u7ea7\u522b\u7684\u52a3\u52bf<\/p>\n<table>\n<tr>\u9694\u79bb\u7ea7\u522b\u95ee\u9898<\/tr>\n<tbody>\n<tr>\n<td>RC<\/td>\n<td>\u4e0d\u53ef\u91cd\u590d\u8bfb&#xff08;\u540c\u4e00\u4e8b\u52a1\u5185\u8bfb\u5230\u5176\u4ed6\u4e8b\u52a1\u63d0\u4ea4\u7684\u4fee\u6539&#xff09; \u2192 \u4e1a\u52a1\u903b\u8f91\u53ef\u80fd\u51fa\u9519<\/td>\n<\/tr>\n<tr>\n<td>RU<\/td>\n<td>\u810f\u8bfb\u98ce\u9669\u9ad8 \u2192 \u6570\u636e\u5b8c\u5168\u4e0d\u53ef\u63a7<\/td>\n<\/tr>\n<tr>\n<td>S<\/td>\n<td>\u5e76\u53d1\u6027\u80fd\u5dee&#xff08;\u8bfb\u52a0\u5171\u4eab\u9501\u963b\u585e\u5199&#xff09; \u2192 \u96be\u4ee5\u652f\u6491\u9ad8\u5e76\u53d1<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>II.RR \u7ea7\u522b\u7684\u5b9e\u73b0\u673a\u5236&#xff1a;<\/p>\n<li>\n<p>MVCC \u5feb\u7167\u8bfb&#xff08;\u6838\u5fc3&#xff09;<\/p>\n<ul>\n<li>\n<p>\u4e8b\u52a1\u9996\u6b21\u00a0SELECT\u00a0\u65f6\u751f\u6210\u00a0ReadView&#xff0c;\u8bb0\u5f55\u5f53\u524d\u6d3b\u8dc3\u4e8b\u52a1 ID \u5feb\u7167\u3002<\/p>\n<\/li>\n<li>\n<p>\u540e\u7eed\u8bfb\u64cd\u4f5c\u57fa\u4e8e\u8be5\u00a0ReadView\u00a0\u5224\u65ad\u6570\u636e\u53ef\u89c1\u6027&#xff08;\u901a\u8fc7\u00a0DB_TRX_ID\u00a0\u548c\u00a0DB_ROLL_PTR\u00a0\u8bbf\u95ee Undo Log \u5386\u53f2\u7248\u672c&#xff09;\u3002<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>\u95f4\u9699\u9501&#xff08;\u89e3\u51b3\u5e7b\u8bfb&#xff09;<\/p>\n<ul>\n<li>\n<p>\u5bf9\u67e5\u8be2\u8303\u56f4\u52a0\u9501&#xff08;\u5982\u00a0id BETWEEN 10 AND 20\u00a0\u4f1a\u9501\u5b9a\u00a0[10,20]\u00a0\u533a\u95f4&#xff09;&#xff0c;\u963b\u585e\u5176\u4ed6\u4e8b\u52a1\u63d2\u5165\u533a\u95f4\u5185\u7684\u65b0\u6570\u636e\u3002<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<p>\u672c\u6587\u5230\u6b64\u7ed3\u675f&#xff0c;\u5982\u679c\u5bf9\u4f60\u6709\u5e2e\u52a9&#xff0c;\u53ef\u4ee5\u70b9\u4e2a\u8d5e~<\/p>\n<p>\u540e\u7eed\u4f1a\u5728\u5408\u96c6\u91cc\u6301\u7eed\u66f4\u65b0 MySQL \u76f8\u5173\u7684\u9762\u8bd5\u9898&#xff0c;\u6b22\u8fce\u5173\u6ce8~<\/p>\n<p>\u795d\u5404\u4f4d\u90fd\u80fd\u62ff\u5230\u6ee1\u610f\u7684offer~<\/p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb138\u6b21\uff0c\u70b9\u8d5e6\u6b21\uff0c\u6536\u85cf2\u6b21\u3002\u4e00\u4e9b\u5173\u4e8emysql\u7684\u9762\u8bd5\u9898\uff0c\u540e\u7eed\u4f1a\u6301\u7eed\u66f4\u65b0\u3002<\/p>\n","protected":false},"author":2,"featured_media":46109,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[4381,114,176],"topic":[],"class_list":["post-46114","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-java-","tag-mysql","tag-176"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u3010\u79cb\u62db\u5fc5\u770b\u3011MySQL \u9762\u8bd5\u70ed\u9898\uff08\u4e8c\uff09 - \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\/46114.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u3010\u79cb\u62db\u5fc5\u770b\u3011MySQL \u9762\u8bd5\u70ed\u9898\uff08\u4e8c\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb138\u6b21\uff0c\u70b9\u8d5e6\u6b21\uff0c\u6536\u85cf2\u6b21\u3002\u4e00\u4e9b\u5173\u4e8emysql\u7684\u9762\u8bd5\u9898\uff0c\u540e\u7eed\u4f1a\u6301\u7eed\u66f4\u65b0\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/46114.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2025-07-29T18:26:31+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/07\/20250729182626-68891252955c7.png\" \/>\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=\"7 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/46114.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/46114.html\",\"name\":\"\u3010\u79cb\u62db\u5fc5\u770b\u3011MySQL \u9762\u8bd5\u70ed\u9898\uff08\u4e8c\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-07-29T18:26:31+00:00\",\"dateModified\":\"2025-07-29T18:26:31+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/46114.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/46114.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/46114.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u3010\u79cb\u62db\u5fc5\u770b\u3011MySQL \u9762\u8bd5\u70ed\u9898\uff08\u4e8c\uff09\"}]},{\"@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":"\u3010\u79cb\u62db\u5fc5\u770b\u3011MySQL \u9762\u8bd5\u70ed\u9898\uff08\u4e8c\uff09 - \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\/46114.html","og_locale":"zh_CN","og_type":"article","og_title":"\u3010\u79cb\u62db\u5fc5\u770b\u3011MySQL \u9762\u8bd5\u70ed\u9898\uff08\u4e8c\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb138\u6b21\uff0c\u70b9\u8d5e6\u6b21\uff0c\u6536\u85cf2\u6b21\u3002\u4e00\u4e9b\u5173\u4e8emysql\u7684\u9762\u8bd5\u9898\uff0c\u540e\u7eed\u4f1a\u6301\u7eed\u66f4\u65b0\u3002","og_url":"https:\/\/www.wsisp.com\/helps\/46114.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-07-29T18:26:31+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/07\/20250729182626-68891252955c7.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"7 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/46114.html","url":"https:\/\/www.wsisp.com\/helps\/46114.html","name":"\u3010\u79cb\u62db\u5fc5\u770b\u3011MySQL \u9762\u8bd5\u70ed\u9898\uff08\u4e8c\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-07-29T18:26:31+00:00","dateModified":"2025-07-29T18:26:31+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/46114.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/46114.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/46114.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u3010\u79cb\u62db\u5fc5\u770b\u3011MySQL \u9762\u8bd5\u70ed\u9898\uff08\u4e8c\uff09"}]},{"@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\/46114","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=46114"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/46114\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/46109"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=46114"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=46114"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=46114"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=46114"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}