添加链接
注册
登录
link之家
链接快照平台
输入网页链接,自动生成快照
标签化管理网页链接
相关文章推荐
帅呆的紫菜汤
·
神经网络训练怎么多线程 - CSDN文库
·
2 月前
·
刚毅的皮带
·
GridView动态创建列、多行表头_myg ...
·
1 年前
·
潇洒的领结
·
手把手带你用Python完成一个能写进简历的 ...
·
1 年前
·
怕老婆的罐头
·
Can‘t use Subversion ...
·
1 年前
·
性感的绿豆
·
用户对问题“VBA将数据行转换为列。”的回答 ...
·
1 年前
·
link之家
›
慢查询日志 | PingCAP 文档中心
select
tidb
sql优化
sql语言
https://docs.pingcap.com/zh/tidb/stable/identify-slow-queries
强健的猕猴桃
8 月前
</noscript><noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-TPX49SBK" height="0" width="0" style="display: none; visibility: hidden" aria-hidden="true"/></noscript><div id="___gatsby"><div style="outline:none" tabindex="-1" id="gatsby-focus-wrapper"><style data-emotion="css 6ko3zs">.css-6ko3zs{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;width:100%;box-sizing:border-box;-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;position:fixed;z-index:1100;top:0;left:auto;right:0;background-color:#1976d2;color:#fff;background-color:#f9f9f9;border-bottom:1px solid #e5e5e5;box-shadow:0px 1px 6px rgba(0, 0, 0, 0.08);height:5rem;}@media print{.css-6ko3zs{}}</style><style data-emotion="css foju0o">.css-foju0o{background-color:#fff;color:rgba(0, 0, 0, 0.87);-webkit-transition:box-shadow 300ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;transition:box-shadow 300ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;box-shadow:0px 2px 4px -1px rgba(0,0,0,0.2),0px 4px 5px 0px rgba(0,0,0,0.14),0px 1px 10px 0px rgba(0,0,0,0.12);display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;width:100%;box-sizing:border-box;-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;position:fixed;z-index:1100;top:0;left:auto;right:0;background-color:#1976d2;color:#fff;background-color:#f9f9f9;border-bottom:1px solid #e5e5e5;box-shadow:0px 1px 6px rgba(0, 0, 0, 0.08);height:5rem;}@media print{.css-foju0o{}}</style><header class="MuiPaper-root MuiPaper-elevation MuiPaper-elevation4 MuiAppBar-root MuiAppBar-colorPrimary MuiAppBar-positionFixed doc-site-header mui-fixed css-foju0o"><style data-emotion="css 1xw2ef0">.css-1xw2ef0{position:relative;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding-left:16px;padding-right:16px;min-height:56px;height:100%;}@media (min-width:600px){.css-1xw2ef0{padding-left:24px;padding-right:24px;}}@media (min-width:0px){@media (orientation: landscape){.css-1xw2ef0{min-height:48px;}}}@media (min-width:600px){.css-1xw2ef0{min-height:64px;}}@media (min-width:900px){.css-1xw2ef0{padding-left:2rem;padding-right:2rem;}}</style><div class="MuiToolbar-root MuiToolbar-gutters MuiToolbar-regular css-1xw2ef0"><style data-emotion="css 16bbyrv">.css-16bbyrv{text-align:center;-webkit-flex:0 0 auto;-ms-flex:0 0 auto;flex:0 0 auto;font-size:1.5rem;padding:8px;border-radius:50%;overflow:visible;color:rgba(0, 0, 0, 0.54);-webkit-transition:background-color 150ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;transition:background-color 150ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;}.css-16bbyrv:hover{background-color:rgba(0, 0, 0, 0.04);}@media (hover: none){.css-16bbyrv:hover{background-color:transparent;}}.css-16bbyrv.Mui-disabled{background-color:transparent;color:rgba(0, 0, 0, 0.26);}@media (min-width:1200px){.css-16bbyrv{;}}</style><style data-emotion="css iuftj9">.css-iuftj9{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;position:relative;box-sizing:border-box;-webkit-tap-highlight-color:transparent;background-color:transparent;outline:0;border:0;margin:0;border-radius:0;padding:0;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;vertical-align:middle;-moz-appearance:none;-webkit-appearance:none;-webkit-text-decoration:none;text-decoration:none;color:inherit;text-align:center;-webkit-flex:0 0 auto;-ms-flex:0 0 auto;flex:0 0 auto;font-size:1.5rem;padding:8px;border-radius:50%;overflow:visible;color:rgba(0, 0, 0, 0.54);-webkit-transition:background-color 150ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;transition:background-color 150ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;}.css-iuftj9::-moz-focus-inner{border-style:none;}.css-iuftj9.Mui-disabled{pointer-events:none;cursor:default;}@media print{.css-iuftj9{-webkit-print-color-adjust:exact;color-adjust:exact;}}.css-iuftj9:hover{background-color:rgba(0, 0, 0, 0.04);}@media (hover: none){.css-iuftj9:hover{background-color:transparent;}}.css-iuftj9.Mui-disabled{background-color:transparent;color:rgba(0, 0, 0, 0.26);}@media (min-width:1200px){.css-iuftj9{;}}</style><button class="MuiButtonBase-root MuiIconButton-root MuiIconButton-sizeMedium css-iuftj9" tabindex="0" type="button" aria-label="menu"><style data-emotion="css vubbuv">.css-vubbuv{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:1em;height:1em;display:inline-block;fill:currentColor;-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;-webkit-transition:fill 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;transition:fill 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;font-size:1.5rem;}</style><svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeMedium css-vubbuv" focusable="false" aria-hidden="true" viewbox="0 0 24 24" data-testid="MenuIcon"><path d="M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"/></svg></button><style data-emotion="css a3xyjy">.css-a3xyjy{z-index:1200;}</style><style data-emotion="css 13tqxrv">@media (min-width:0px){.css-13tqxrv{;}}@media (min-width:900px){.css-13tqxrv{display:block;}}</style><div class="MuiBox-root css-13tqxrv"><style data-emotion="css tx8jsd">.css-tx8jsd{margin:0;font-size:1rem;line-height:1.5rem;font-family:"Helvetica Neue","sans-serif";font-weight:400;font-style:normal;color:#666666;}</style><a class="MuiTypography-root MuiTypography-body1 css-tx8jsd" target="_blank" href="https://cn.pingcap.com/" style="text-decoration:none"><style data-emotion="css uz5bjn">.css-uz5bjn{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:1em;height:1em;display:inline-block;fill:currentColor;-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;-webkit-transition:fill 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;transition:fill 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;font-size:1.5rem;width:6.75rem;}@media (min-width:0px){.css-uz5bjn{;}}@media (min-width:600px){.css-uz5bjn{display:block;}}</style><svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeMedium css-uz5bjn" focusable="false" aria-hidden="true" viewbox="0 0 769.89 203.08"><g id="Layer_2" data-name="Layer 2"><g id="Layer_1-2" data-name="Layer 1"><path fill="#082265" d="M100.11,47.34l-88-25.1A9.5,9.5,0,0,0,0,31.38v162.2a9.51,9.51,0,0,0,9.48,9.5,9.35,9.35,0,0,0,2.22-.26l88-21h0a9.48,9.48,0,0,0,7.3-9.25V56.48A9.54,9.54,0,0,0,100.11,47.34Z"/><path fill="#00aeef" d="M160.05,41.57a9.55,9.55,0,0,0-6.88-9.11L41.16.37A9.5,9.5,0,0,0,29,9.51V132.59a9.47,9.47,0,0,0,11.72,9.23l112.14-27a9.47,9.47,0,0,0,7.28-9.26Z"/><path fill="#303eab" d="M100.11,47.34,29,27.07V132.59a9.47,9.47,0,0,0,11.72,9.23L107,125.88V56.48A9.54,9.54,0,0,0,100.11,47.34Z"/><path fill="#082265" d="M576.1,126.26h0l-.23.37a40.12,40.12,0,0,1-13.72,13.09,36.62,36.62,0,0,1-18.78,5.43c-10.94,0-20.51-4.36-28.42-13a43.82,43.82,0,0,1-11.37-31,43.09,43.09,0,0,1,11.74-29.38c7.62-8.17,16.81-12.31,27.3-12.31,14.37-.13,25.2,5.8,33.13,18.13L576,78h.22l9.33-5.77a51.65,51.65,0,0,0-15.42-16.39,48.17,48.17,0,0,0-26.73-8.09A46.85,46.85,0,0,0,507.66,63c-9.94,10.23-15,23.28-15,38.77,0,15,5,28.08,14.84,38.9,9.81,10.64,21.69,16,35.33,16h.51c17.92-.37,32.69-9.06,42.11-24.6Z"/><polygon fill="#082265" points="645.84 49.09 633.16 49.09 586.01 154.63 601.05 154.63 615.63 119.55 615.65 119.55 620.8 108.59 620.78 108.59 639.76 64.05 658.36 108.59 631.66 108.59 626.79 119.55 662.69 119.55 677.4 154.63 690.66 154.63 645.84 49.09"/><path fill="#082265" d="M759.63,58.75c-7-6.32-15.81-9.52-26.18-9.52H699.3v105.4h12.44V113.34h0V102.25h0V60.59H734a24.73,24.73,0,0,1,16.22,5.63,18.12,18.12,0,0,1,7.37,14c.39,6.62-1.77,11.88-6.61,16.07a23.43,23.43,0,0,1-16.31,6H721.77v11.09h14.91a33.34,33.34,0,0,0,23.23-8.85,29,29,0,0,0,10-21.91C770,72.89,766.58,64.87,759.63,58.75Z"/><rect fill="#082265" x="296.25" y="51.17" width="12.44" height="12.44"/><rect fill="#082265" x="296.25" y="79.04" width="12.44" height="75.74"/><path fill="#082265" d="M483.63,147.21V114.69a38.6,38.6,0,0,0-12.25-29.2c-8.22-8.22-18.1-12.27-29.35-12a39.17,39.17,0,0,0-27.82,12.54,40.08,40.08,0,0,0-11.29,28.49,41,41,0,0,0,12.24,29.59c8.19,8.18,18,12.12,29.22,11.71a38.78,38.78,0,0,0,27.48-12.33v5.17m0,0c0,6.88-2.73,12.89-8.11,17.88a27.1,27.1,0,0,1-19,7.73,27.83,27.83,0,0,1-16.93-5.64,25.92,25.92,0,0,1-9-10.54l-9.52,5.5a36.63,36.63,0,0,0,9.94,12c6.6,5.25,14.75,8.13,24.23,8.54.59,0,1.18,0,1.77,0a40.89,40.89,0,0,0,26-9.25c8.17-6.52,12.32-14.86,12.32-24.8v-2.95m-12-31.74a29.23,29.23,0,0,1-8.41,20.22,25.68,25.68,0,0,1-19.5,8.38,27.3,27.3,0,0,1-20.2-8.39,28.22,28.22,0,0,1-8.66-20.34,28.66,28.66,0,0,1,7.88-20.61,27.21,27.21,0,0,1,19.53-9.45c.51,0,1,0,1.5,0,7.61,0,14,2.85,19.45,8.69A28.51,28.51,0,0,1,471.59,115.47Z"/><path fill="#082265" d="M274.1,58.75c-7-6.32-15.81-9.52-26.19-9.52H213.76v105.4h12.45V113.34h0V102.25h0V60.59h22.24a24.73,24.73,0,0,1,16.23,5.63,18.12,18.12,0,0,1,7.37,14c.39,6.62-1.77,11.88-6.61,16.07a23.43,23.43,0,0,1-16.31,6H236.24v11.09h14.91a33.34,33.34,0,0,0,23.23-8.85,29,29,0,0,0,10-21.91C284.5,72.89,281.05,64.87,274.1,58.75Z"/><path fill="#082265" d="M357.54,74.41c-9.92,0-18.3,3.43-24.94,10.2s-9.91,15.24-9.91,25.33v44.53h12V108.86a21.82,21.82,0,0,1,6.75-16.1A22.08,22.08,0,0,1,357.54,86a21.49,21.49,0,0,1,15.82,6.75,21.86,21.86,0,0,1,6.89,16.1v45.61h12V109.94c0-10.09-3.34-18.61-9.92-25.33A33.47,33.47,0,0,0,357.54,74.41Z"/></g></g></svg></a></div><style data-emotion="css 5qlh60">.css-5qlh60{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;padding-left:2rem;height:100%;}.css-5qlh60>:not(style)+:not(style){margin:0;margin-left:24px;}@media (min-width:0px){.css-5qlh60{;}}@media (min-width:900px){.css-5qlh60{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}}</style><div class="css-5qlh60"><style data-emotion="css kiou0g">.css-kiou0g{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding-top:0.25rem;padding-bottom:0.25rem;}</style><div class="MuiBox-root css-kiou0g"><a style="text-decoration:none" hreflang="zh" href="/zh/"><style data-emotion="css 2jgwiy">.css-2jgwiy{margin:0;font-size:1rem;line-height:1.5rem;font-family:"Helvetica Neue","sans-serif";font-weight:400;font-style:normal;color:#666666;color:#282a36;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,"IBM Plex Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji";display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:4px;}</style><div class="MuiTypography-root MuiTypography-body1 css-2jgwiy">文档中心</div></a></div><div class="MuiBox-root css-kiou0g"><a style="text-decoration:none" hreflang="zh" href="/zh/tidb/stable"><div class="MuiTypography-root MuiTypography-body1 css-2jgwiy">TiDB</div></a></div><div class="MuiBox-root css-kiou0g"><a class="MuiTypography-root MuiTypography-body1 css-tx8jsd" target="_blank" href="https://asktug.com/" style="text-decoration:none"><div class="MuiTypography-root MuiTypography-body1 css-2jgwiy">社区</div></a></div><div class="MuiBox-root css-kiou0g"><a class="MuiTypography-root MuiTypography-body1 css-tx8jsd" target="_blank" href="https://cn.pingcap.com/contact/" style="text-decoration:none"><div class="MuiTypography-root MuiTypography-body1 css-2jgwiy">联系我们</div></a></div><div class="MuiBox-root css-kiou0g"><a class="MuiTypography-root MuiTypography-body1 css-tx8jsd" target="_blank" href="https://cn.pingcap.com/product/#SelectProduct" style="text-decoration:none"><div class="MuiTypography-root MuiTypography-body1 css-2jgwiy"><style data-emotion="css xnd31y">.css-xnd31y{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:1em;height:1em;display:inline-block;fill:currentColor;-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;-webkit-transition:fill 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;transition:fill 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;font-size:inherit;padding-top:0.5rem;}</style><svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeInherit css-xnd31y" focusable="false" aria-hidden="true" viewbox="0 0 24 24" data-testid="DownloadIcon"><path d="M5 20h14v-2H5v2zM19 9h-4V3H9v6H5l7 7 7-7z"/></svg></div></a></div></div><style data-emotion="css 1vn3uc0">.css-1vn3uc0{color:#282a36;}@media (min-width:900px){.css-1vn3uc0{;}}</style><div class="MuiBox-root css-1vn3uc0"><style data-emotion="css btg76o">.css-btg76o{text-transform:none;font-family:-apple-system,"Poppins","Helvetica Neue",sans-serif,"Noto Sans","Fira Code","IBM Plex Sans","sans-serif";font-weight:500;font-size:0.875rem;line-height:1.75;min-width:64px;padding:6px 8px;border-radius:4px;-webkit-transition:background-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,border-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;transition:background-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,border-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;color:inherit;border-color:currentColor;box-shadow:none;}.css-btg76o:hover{-webkit-text-decoration:none;text-decoration:none;background-color:rgba(0, 0, 0, 0.04);}@media (hover: none){.css-btg76o:hover{background-color:transparent;}}.css-btg76o.Mui-disabled{color:rgba(0, 0, 0, 0.26);}.css-btg76o:hover{box-shadow:none;}.css-btg76o.Mui-focusVisible{box-shadow:none;}.css-btg76o:active{box-shadow:none;}.css-btg76o.Mui-disabled{box-shadow:none;}</style><style data-emotion="css 1ei260h">.css-1ei260h{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;position:relative;box-sizing:border-box;-webkit-tap-highlight-color:transparent;background-color:transparent;outline:0;border:0;margin:0;border-radius:0;padding:0;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;vertical-align:middle;-moz-appearance:none;-webkit-appearance:none;-webkit-text-decoration:none;text-decoration:none;color:inherit;text-transform:none;font-family:-apple-system,"Poppins","Helvetica Neue",sans-serif,"Noto Sans","Fira Code","IBM Plex Sans","sans-serif";font-weight:500;font-size:0.875rem;line-height:1.75;min-width:64px;padding:6px 8px;border-radius:4px;-webkit-transition:background-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,border-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;transition:background-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,border-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;color:inherit;border-color:currentColor;box-shadow:none;}.css-1ei260h::-moz-focus-inner{border-style:none;}.css-1ei260h.Mui-disabled{pointer-events:none;cursor:default;}@media print{.css-1ei260h{-webkit-print-color-adjust:exact;color-adjust:exact;}}.css-1ei260h:hover{-webkit-text-decoration:none;text-decoration:none;background-color:rgba(0, 0, 0, 0.04);}@media (hover: none){.css-1ei260h:hover{background-color:transparent;}}.css-1ei260h.Mui-disabled{color:rgba(0, 0, 0, 0.26);}.css-1ei260h:hover{box-shadow:none;}.css-1ei260h.Mui-focusVisible{box-shadow:none;}.css-1ei260h:active{box-shadow:none;}.css-1ei260h.Mui-disabled{box-shadow:none;}</style><button class="MuiButtonBase-root MuiButton-root MuiButton-text MuiButton-textInherit MuiButton-sizeMedium MuiButton-textSizeMedium MuiButton-colorInherit MuiButton-disableElevation css-1ei260h" tabindex="0" type="button" id="header-nav-items" aria-haspopup="true"><style data-emotion="css 6xugel">.css-6xugel{display:inherit;margin-right:8px;margin-left:-4px;}.css-6xugel>*:nth-of-type(1){font-size:20px;}</style><span class="MuiButton-startIcon MuiButton-iconSizeMedium css-6xugel"><style data-emotion="css 1x9zct">.css-1x9zct{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:1em;height:1em;display:inline-block;fill:currentColor;-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;-webkit-transition:fill 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;transition:fill 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;font-size:1.5rem;width:6.75rem;height:1.5rem;}</style><svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeMedium css-1x9zct" focusable="false" aria-hidden="true" viewbox="0 0 769.89 203.08"><g id="Layer_2" data-name="Layer 2"><g id="Layer_1-2" data-name="Layer 1"><path fill="#082265" d="M100.11,47.34l-88-25.1A9.5,9.5,0,0,0,0,31.38v162.2a9.51,9.51,0,0,0,9.48,9.5,9.35,9.35,0,0,0,2.22-.26l88-21h0a9.48,9.48,0,0,0,7.3-9.25V56.48A9.54,9.54,0,0,0,100.11,47.34Z"/><path fill="#00aeef" d="M160.05,41.57a9.55,9.55,0,0,0-6.88-9.11L41.16.37A9.5,9.5,0,0,0,29,9.51V132.59a9.47,9.47,0,0,0,11.72,9.23l112.14-27a9.47,9.47,0,0,0,7.28-9.26Z"/><path fill="#303eab" d="M100.11,47.34,29,27.07V132.59a9.47,9.47,0,0,0,11.72,9.23L107,125.88V56.48A9.54,9.54,0,0,0,100.11,47.34Z"/><path fill="#082265" d="M576.1,126.26h0l-.23.37a40.12,40.12,0,0,1-13.72,13.09,36.62,36.62,0,0,1-18.78,5.43c-10.94,0-20.51-4.36-28.42-13a43.82,43.82,0,0,1-11.37-31,43.09,43.09,0,0,1,11.74-29.38c7.62-8.17,16.81-12.31,27.3-12.31,14.37-.13,25.2,5.8,33.13,18.13L576,78h.22l9.33-5.77a51.65,51.65,0,0,0-15.42-16.39,48.17,48.17,0,0,0-26.73-8.09A46.85,46.85,0,0,0,507.66,63c-9.94,10.23-15,23.28-15,38.77,0,15,5,28.08,14.84,38.9,9.81,10.64,21.69,16,35.33,16h.51c17.92-.37,32.69-9.06,42.11-24.6Z"/><polygon fill="#082265" points="645.84 49.09 633.16 49.09 586.01 154.63 601.05 154.63 615.63 119.55 615.65 119.55 620.8 108.59 620.78 108.59 639.76 64.05 658.36 108.59 631.66 108.59 626.79 119.55 662.69 119.55 677.4 154.63 690.66 154.63 645.84 49.09"/><path fill="#082265" d="M759.63,58.75c-7-6.32-15.81-9.52-26.18-9.52H699.3v105.4h12.44V113.34h0V102.25h0V60.59H734a24.73,24.73,0,0,1,16.22,5.63,18.12,18.12,0,0,1,7.37,14c.39,6.62-1.77,11.88-6.61,16.07a23.43,23.43,0,0,1-16.31,6H721.77v11.09h14.91a33.34,33.34,0,0,0,23.23-8.85,29,29,0,0,0,10-21.91C770,72.89,766.58,64.87,759.63,58.75Z"/><rect fill="#082265" x="296.25" y="51.17" width="12.44" height="12.44"/><rect fill="#082265" x="296.25" y="79.04" width="12.44" height="75.74"/><path fill="#082265" d="M483.63,147.21V114.69a38.6,38.6,0,0,0-12.25-29.2c-8.22-8.22-18.1-12.27-29.35-12a39.17,39.17,0,0,0-27.82,12.54,40.08,40.08,0,0,0-11.29,28.49,41,41,0,0,0,12.24,29.59c8.19,8.18,18,12.12,29.22,11.71a38.78,38.78,0,0,0,27.48-12.33v5.17m0,0c0,6.88-2.73,12.89-8.11,17.88a27.1,27.1,0,0,1-19,7.73,27.83,27.83,0,0,1-16.93-5.64,25.92,25.92,0,0,1-9-10.54l-9.52,5.5a36.63,36.63,0,0,0,9.94,12c6.6,5.25,14.75,8.13,24.23,8.54.59,0,1.18,0,1.77,0a40.89,40.89,0,0,0,26-9.25c8.17-6.52,12.32-14.86,12.32-24.8v-2.95m-12-31.74a29.23,29.23,0,0,1-8.41,20.22,25.68,25.68,0,0,1-19.5,8.38,27.3,27.3,0,0,1-20.2-8.39,28.22,28.22,0,0,1-8.66-20.34,28.66,28.66,0,0,1,7.88-20.61,27.21,27.21,0,0,1,19.53-9.45c.51,0,1,0,1.5,0,7.61,0,14,2.85,19.45,8.69A28.51,28.51,0,0,1,471.59,115.47Z"/><path fill="#082265" d="M274.1,58.75c-7-6.32-15.81-9.52-26.19-9.52H213.76v105.4h12.45V113.34h0V102.25h0V60.59h22.24a24.73,24.73,0,0,1,16.23,5.63,18.12,18.12,0,0,1,7.37,14c.39,6.62-1.77,11.88-6.61,16.07a23.43,23.43,0,0,1-16.31,6H236.24v11.09h14.91a33.34,33.34,0,0,0,23.23-8.85,29,29,0,0,0,10-21.91C284.5,72.89,281.05,64.87,274.1,58.75Z"/><path fill="#082265" d="M357.54,74.41c-9.92,0-18.3,3.43-24.94,10.2s-9.91,15.24-9.91,25.33v44.53h12V108.86a21.82,21.82,0,0,1,6.75-16.1A22.08,22.08,0,0,1,357.54,86a21.49,21.49,0,0,1,15.82,6.75,21.86,21.86,0,0,1,6.89,16.1v45.61h12V109.94c0-10.09-3.34-18.61-9.92-25.33A33.47,33.47,0,0,0,357.54,74.41Z"/></g></g></svg></span><style data-emotion="css 1n4a93h">.css-1n4a93h{display:inherit;margin-right:-4px;margin-left:8px;}.css-1n4a93h>*:nth-of-type(1){font-size:20px;}</style><span class="MuiButton-endIcon MuiButton-iconSizeMedium css-1n4a93h"><svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeMedium css-vubbuv" focusable="false" aria-hidden="true" viewbox="0 0 24 24" data-testid="KeyboardArrowDownIcon"><path d="M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"/></svg></span></button></div><style data-emotion="css jnv64h">.css-jnv64h{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;margin-left:auto;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}@media (min-width:0px){.css-jnv64h>:not(style)+:not(style){margin:0;margin-left:8px;}}@media (min-width:1200px){.css-jnv64h>:not(style)+:not(style){margin:0;margin-left:24px;}}</style><div class="css-jnv64h"><style data-emotion="css 1qlh2t1">.css-1qlh2t1{color:#282a36;}</style><div class="MuiBox-root css-1qlh2t1"><style data-emotion="css 1mvsusm">.css-1mvsusm{text-align:center;-webkit-flex:0 0 auto;-ms-flex:0 0 auto;flex:0 0 auto;font-size:1.5rem;padding:8px;border-radius:50%;overflow:visible;color:rgba(0, 0, 0, 0.54);-webkit-transition:background-color 150ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;transition:background-color 150ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;color:inherit;}.css-1mvsusm:hover{background-color:rgba(0, 0, 0, 0.04);}@media (hover: none){.css-1mvsusm:hover{background-color:transparent;}}.css-1mvsusm.Mui-disabled{background-color:transparent;color:rgba(0, 0, 0, 0.26);}@media (min-width:1200px){.css-1mvsusm{;}}</style><style data-emotion="css jwr93t">.css-jwr93t{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;position:relative;box-sizing:border-box;-webkit-tap-highlight-color:transparent;background-color:transparent;outline:0;border:0;margin:0;border-radius:0;padding:0;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;vertical-align:middle;-moz-appearance:none;-webkit-appearance:none;-webkit-text-decoration:none;text-decoration:none;color:inherit;text-align:center;-webkit-flex:0 0 auto;-ms-flex:0 0 auto;flex:0 0 auto;font-size:1.5rem;padding:8px;border-radius:50%;overflow:visible;color:rgba(0, 0, 0, 0.54);-webkit-transition:background-color 150ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;transition:background-color 150ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;color:inherit;}.css-jwr93t::-moz-focus-inner{border-style:none;}.css-jwr93t.Mui-disabled{pointer-events:none;cursor:default;}@media print{.css-jwr93t{-webkit-print-color-adjust:exact;color-adjust:exact;}}.css-jwr93t:hover{background-color:rgba(0, 0, 0, 0.04);}@media (hover: none){.css-jwr93t:hover{background-color:transparent;}}.css-jwr93t.Mui-disabled{background-color:transparent;color:rgba(0, 0, 0, 0.26);}@media (min-width:1200px){.css-jwr93t{;}}</style><button class="MuiButtonBase-root MuiIconButton-root MuiIconButton-sizeMedium css-jwr93t" tabindex="0" type="button"><svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeMedium css-vubbuv" focusable="false" aria-hidden="true" viewbox="0 0 24 24" data-testid="LanguageIcon"><path d="M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zm6.93 6h-2.95c-.32-1.25-.78-2.45-1.38-3.56 1.84.63 3.37 1.91 4.33 3.56zM12 4.04c.83 1.2 1.48 2.53 1.91 3.96h-3.82c.43-1.43 1.08-2.76 1.91-3.96zM4.26 14C4.1 13.36 4 12.69 4 12s.1-1.36.26-2h3.38c-.08.66-.14 1.32-.14 2 0 .68.06 1.34.14 2H4.26zm.82 2h2.95c.32 1.25.78 2.45 1.38 3.56-1.84-.63-3.37-1.9-4.33-3.56zm2.95-8H5.08c.96-1.66 2.49-2.93 4.33-3.56C8.81 5.55 8.35 6.75 8.03 8zM12 19.96c-.83-1.2-1.48-2.53-1.91-3.96h3.82c-.43 1.43-1.08 2.76-1.91 3.96zM14.34 14H9.66c-.09-.66-.16-1.32-.16-2 0-.68.07-1.35.16-2h4.68c.09.65.16 1.32.16 2 0 .68-.07 1.34-.16 2zm.25 5.56c.6-1.11 1.06-2.31 1.38-3.56h2.95c-.96 1.65-2.49 2.93-4.33 3.56zM16.36 14c.08-.66.14-1.32.14-2 0-.68-.06-1.34-.14-2h3.38c.16.64.26 1.31.26 2s-.1 1.36-.26 2h-3.38z"/></svg></button><style data-emotion="css t5gsfy">.css-t5gsfy{text-transform:none;font-family:-apple-system,"Poppins","Helvetica Neue",sans-serif,"Noto Sans","Fira Code","IBM Plex Sans","sans-serif";font-weight:500;font-size:0.875rem;line-height:1.75;min-width:64px;padding:6px 8px;border-radius:4px;-webkit-transition:background-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,border-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;transition:background-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,border-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;color:inherit;border-color:currentColor;box-shadow:none;}.css-t5gsfy:hover{-webkit-text-decoration:none;text-decoration:none;background-color:rgba(0, 0, 0, 0.04);}@media (hover: none){.css-t5gsfy:hover{background-color:transparent;}}.css-t5gsfy.Mui-disabled{color:rgba(0, 0, 0, 0.26);}.css-t5gsfy:hover{box-shadow:none;}.css-t5gsfy.Mui-focusVisible{box-shadow:none;}.css-t5gsfy:active{box-shadow:none;}.css-t5gsfy.Mui-disabled{box-shadow:none;}@media (min-width:0px){.css-t5gsfy{;}}@media (min-width:1200px){.css-t5gsfy{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;}}</style><style data-emotion="css 1csz7wa">.css-1csz7wa{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;position:relative;box-sizing:border-box;-webkit-tap-highlight-color:transparent;background-color:transparent;outline:0;border:0;margin:0;border-radius:0;padding:0;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;vertical-align:middle;-moz-appearance:none;-webkit-appearance:none;-webkit-text-decoration:none;text-decoration:none;color:inherit;text-transform:none;font-family:-apple-system,"Poppins","Helvetica Neue",sans-serif,"Noto Sans","Fira Code","IBM Plex Sans","sans-serif";font-weight:500;font-size:0.875rem;line-height:1.75;min-width:64px;padding:6px 8px;border-radius:4px;-webkit-transition:background-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,border-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;transition:background-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,border-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;color:inherit;border-color:currentColor;box-shadow:none;}.css-1csz7wa::-moz-focus-inner{border-style:none;}.css-1csz7wa.Mui-disabled{pointer-events:none;cursor:default;}@media print{.css-1csz7wa{-webkit-print-color-adjust:exact;color-adjust:exact;}}.css-1csz7wa:hover{-webkit-text-decoration:none;text-decoration:none;background-color:rgba(0, 0, 0, 0.04);}@media (hover: none){.css-1csz7wa:hover{background-color:transparent;}}.css-1csz7wa.Mui-disabled{color:rgba(0, 0, 0, 0.26);}.css-1csz7wa:hover{box-shadow:none;}.css-1csz7wa.Mui-focusVisible{box-shadow:none;}.css-1csz7wa:active{box-shadow:none;}.css-1csz7wa.Mui-disabled{box-shadow:none;}@media (min-width:0px){.css-1csz7wa{;}}@media (min-width:1200px){.css-1csz7wa{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;}}</style><button class="MuiButtonBase-root MuiButton-root MuiButton-text MuiButton-textInherit MuiButton-sizeMedium MuiButton-textSizeMedium MuiButton-colorInherit MuiButton-disableElevation css-1csz7wa" tabindex="0" type="button" id="header-lang-switch" aria-haspopup="true"><span class="MuiButton-startIcon MuiButton-iconSizeMedium css-6xugel"><style data-emotion="css 1slalk2">.css-1slalk2{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:1em;height:1em;display:inline-block;fill:currentColor;-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;-webkit-transition:fill 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;transition:fill 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;font-size:1.5rem;fill:#282a36;}</style><svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeMedium css-1slalk2" focusable="false" aria-hidden="true" viewbox="0 0 24 24" data-testid="LanguageIcon"><path d="M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zm6.93 6h-2.95c-.32-1.25-.78-2.45-1.38-3.56 1.84.63 3.37 1.91 4.33 3.56zM12 4.04c.83 1.2 1.48 2.53 1.91 3.96h-3.82c.43-1.43 1.08-2.76 1.91-3.96zM4.26 14C4.1 13.36 4 12.69 4 12s.1-1.36.26-2h3.38c-.08.66-.14 1.32-.14 2 0 .68.06 1.34.14 2H4.26zm.82 2h2.95c.32 1.25.78 2.45 1.38 3.56-1.84-.63-3.37-1.9-4.33-3.56zm2.95-8H5.08c.96-1.66 2.49-2.93 4.33-3.56C8.81 5.55 8.35 6.75 8.03 8zM12 19.96c-.83-1.2-1.48-2.53-1.91-3.96h3.82c-.43 1.43-1.08 2.76-1.91 3.96zM14.34 14H9.66c-.09-.66-.16-1.32-.16-2 0-.68.07-1.35.16-2h4.68c.09.65.16 1.32.16 2 0 .68-.07 1.34-.16 2zm.25 5.56c.6-1.11 1.06-2.31 1.38-3.56h2.95c-.96 1.65-2.49 2.93-4.33 3.56zM16.36 14c.08-.66.14-1.32.14-2 0-.68-.06-1.34-.14-2h3.38c.16.64.26 1.31.26 2s-.1 1.36-.26 2h-3.38z"/></svg></span><style data-emotion="css 15r93eu">.css-15r93eu{margin:0;font-size:1rem;line-height:1.5rem;font-family:"Helvetica Neue","sans-serif";font-weight:400;font-style:normal;color:#666666;color:inherit;}</style><span class="MuiTypography-root MuiTypography-body1 css-15r93eu">语言</span><span class="MuiButton-endIcon MuiButton-iconSizeMedium css-1n4a93h"><svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeMedium css-1slalk2" focusable="false" aria-hidden="true" viewbox="0 0 24 24" data-testid="KeyboardArrowDownIcon"><path d="M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"/></svg></span></button></div><button class="MuiButtonBase-root MuiIconButton-root MuiIconButton-sizeMedium css-iuftj9" tabindex="0" type="button"><svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeMedium css-vubbuv" focusable="false" aria-hidden="true" viewbox="0 0 24 24" data-testid="SearchIcon"><path d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"/></svg></button><style data-emotion="css ahtg4s">.css-ahtg4s{max-width:13rem;}@media (min-width:0px){.css-ahtg4s{;}}@media (min-width:1200px){.css-ahtg4s{display:block;}}</style><form class="MuiBox-root css-ahtg4s" novalidate="" autocomplete="off"><style data-emotion="css 24u6h2">.css-24u6h2 .MuiOutlinedInput-root:hover fieldset{border-color:#0ca6f2;border-width:1px;}.css-24u6h2 .MuiOutlinedInput-root.Mui-focused fieldset{border-color:#0ca6f2;border-width:1px;}</style><style data-emotion="css fzbqas">.css-fzbqas .MuiOutlinedInput-root:hover fieldset{border-color:#0ca6f2;border-width:1px;}.css-fzbqas .MuiOutlinedInput-root.Mui-focused fieldset{border-color:#0ca6f2;border-width:1px;}</style><style data-emotion="css bj7gct">.css-bj7gct{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;position:relative;min-width:0;padding:0;margin:0;border:0;vertical-align:top;width:100%;}.css-bj7gct .MuiOutlinedInput-root:hover fieldset{border-color:#0ca6f2;border-width:1px;}.css-bj7gct .MuiOutlinedInput-root.Mui-focused fieldset{border-color:#0ca6f2;border-width:1px;}</style><div class="MuiFormControl-root MuiFormControl-fullWidth MuiTextField-root css-bj7gct"><style data-emotion="css-global 1prfaxn">@-webkit-keyframes mui-auto-fill{from{display:block;}}@keyframes mui-auto-fill{from{display:block;}}@-webkit-keyframes mui-auto-fill-cancel{from{display:block;}}@keyframes mui-auto-fill-cancel{from{display:block;}}</style><style data-emotion="css sv5gtw">.css-sv5gtw{font-size:1rem;line-height:1.4375em;font-family:"Helvetica Neue","sans-serif";font-weight:400;font-style:normal;color:rgba(0, 0, 0, 0.87);box-sizing:border-box;position:relative;cursor:text;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;width:100%;position:relative;border-radius:4px;padding-left:14px;background:#fff;}.css-sv5gtw.Mui-disabled{color:rgba(0, 0, 0, 0.38);cursor:default;}.css-sv5gtw:hover .MuiOutlinedInput-notchedOutline{border-color:rgba(0, 0, 0, 0.87);}@media (hover: none){.css-sv5gtw:hover .MuiOutlinedInput-notchedOutline{border-color:rgba(0, 0, 0, 0.23);}}.css-sv5gtw.Mui-focused .MuiOutlinedInput-notchedOutline{border-color:#1976d2;border-width:2px;}.css-sv5gtw.Mui-error .MuiOutlinedInput-notchedOutline{border-color:#d32f2f;}.css-sv5gtw.Mui-disabled .MuiOutlinedInput-notchedOutline{border-color:rgba(0, 0, 0, 0.26);}</style><div class="MuiInputBase-root MuiOutlinedInput-root MuiInputBase-colorPrimary MuiInputBase-fullWidth MuiInputBase-formControl MuiInputBase-sizeSmall MuiInputBase-adornedStart css-sv5gtw"><style data-emotion="css 1a6giau">.css-1a6giau{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;height:0.01em;max-height:2em;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;white-space:nowrap;color:rgba(0, 0, 0, 0.54);margin-right:8px;}</style><div class="MuiInputAdornment-root MuiInputAdornment-positionStart MuiInputAdornment-outlined MuiInputAdornment-sizeSmall css-1a6giau"><span class="notranslate"></span><svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeMedium css-vubbuv" focusable="false" aria-hidden="true" viewbox="0 0 24 24" data-testid="SearchIcon"><path d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"/></svg></div><style data-emotion="css f2zrvi">.css-f2zrvi{font:inherit;letter-spacing:inherit;color:currentColor;padding:4px 0 5px;border:0;box-sizing:content-box;background:none;height:1.4375em;margin:0;-webkit-tap-highlight-color:transparent;display:block;min-width:0;width:100%;-webkit-animation-name:mui-auto-fill-cancel;animation-name:mui-auto-fill-cancel;-webkit-animation-duration:10ms;animation-duration:10ms;padding-top:1px;-moz-appearance:textfield;padding:8.5px 14px;padding-left:0;}.css-f2zrvi::-webkit-input-placeholder{color:currentColor;opacity:0.42;-webkit-transition:opacity 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;transition:opacity 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;}.css-f2zrvi::-moz-placeholder{color:currentColor;opacity:0.42;-webkit-transition:opacity 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;transition:opacity 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;}.css-f2zrvi:-ms-input-placeholder{color:currentColor;opacity:0.42;-webkit-transition:opacity 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;transition:opacity 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;}.css-f2zrvi::-ms-input-placeholder{color:currentColor;opacity:0.42;-webkit-transition:opacity 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;transition:opacity 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;}.css-f2zrvi:focus{outline:0;}.css-f2zrvi:invalid{box-shadow:none;}.css-f2zrvi::-webkit-search-decoration{-webkit-appearance:none;}label[data-shrink=false]+.MuiInputBase-formControl .css-f2zrvi::-webkit-input-placeholder{opacity:0!important;}label[data-shrink=false]+.MuiInputBase-formControl .css-f2zrvi::-moz-placeholder{opacity:0!important;}label[data-shrink=false]+.MuiInputBase-formControl .css-f2zrvi:-ms-input-placeholder{opacity:0!important;}label[data-shrink=false]+.MuiInputBase-formControl .css-f2zrvi::-ms-input-placeholder{opacity:0!important;}label[data-shrink=false]+.MuiInputBase-formControl .css-f2zrvi:focus::-webkit-input-placeholder{opacity:0.42;}label[data-shrink=false]+.MuiInputBase-formControl .css-f2zrvi:focus::-moz-placeholder{opacity:0.42;}label[data-shrink=false]+.MuiInputBase-formControl .css-f2zrvi:focus:-ms-input-placeholder{opacity:0.42;}label[data-shrink=false]+.MuiInputBase-formControl .css-f2zrvi:focus::-ms-input-placeholder{opacity:0.42;}.css-f2zrvi.Mui-disabled{opacity:1;-webkit-text-fill-color:rgba(0, 0, 0, 0.38);}.css-f2zrvi:-webkit-autofill{-webkit-animation-duration:5000s;animation-duration:5000s;-webkit-animation-name:mui-auto-fill;animation-name:mui-auto-fill;}.css-f2zrvi:-webkit-autofill{border-radius:inherit;}</style><input type="search" aria-invalid="false" id="doc-search" placeholder="搜索文档" value="" class="MuiInputBase-input MuiOutlinedInput-input MuiInputBase-inputTypeSearch MuiInputBase-inputSizeSmall MuiInputBase-inputAdornedStart css-f2zrvi"/><style data-emotion="css 19w1uun">.css-19w1uun{border-color:rgba(0, 0, 0, 0.23);}</style><style data-emotion="css igs3ac">.css-igs3ac{text-align:left;bottom:0;right:0;top:-5px;left:0;margin:0;padding:0 8px;pointer-events:none;border-radius:inherit;border-style:solid;border-width:1px;overflow:hidden;min-width:0%;border-color:rgba(0, 0, 0, 0.23);}</style><fieldset aria-hidden="true" class="MuiOutlinedInput-notchedOutline css-igs3ac"><style data-emotion="css hdw1oc">.css-hdw1oc{float:unset;overflow:hidden;padding:0;line-height:11px;-webkit-transition:width 150ms cubic-bezier(0.0, 0, 0.2, 1) 0ms;transition:width 150ms cubic-bezier(0.0, 0, 0.2, 1) 0ms;}</style><legend class="css-hdw1oc"><span class="notranslate"></span></legend></fieldset></div></div></form></div></div></header><style data-emotion="css s1brf2">.css-s1brf2{margin-top:5rem;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}</style><div class="PingCAP-Doc MuiBox-root css-s1brf2"><style data-emotion="css hboir5">.css-hboir5{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;width:100%;}</style><div class="MuiBox-root css-hboir5"><style data-emotion="css 2tzg8">.css-2tzg8{width:18.75rem;border-right:1px solid #E5E4E4;}@media (min-width:0px){.css-2tzg8{;}}@media (min-width:1200px){.css-2tzg8{display:block;}}</style><aside class="MuiBox-root css-2tzg8"><style data-emotion="css 1eohm8p">.css-1eohm8p{position:-webkit-sticky;position:sticky;top:5rem;height:100%;max-height:calc(100vh - 7rem);overflow-y:auto;padding:1rem;}</style><div class="MuiBox-root css-1eohm8p"><style data-emotion="css fmyu0n">.css-fmyu0n{text-transform:none;font-family:-apple-system,"Poppins","Helvetica Neue",sans-serif,"Noto Sans","Fira Code","IBM Plex Sans","sans-serif";font-weight:500;font-size:0.875rem;line-height:1.75;min-width:64px;padding:6px 8px;border-radius:4px;-webkit-transition:background-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,border-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;transition:background-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,border-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;color:#1976d2;width:100%;height:2rem;-webkit-box-pack:justify;-webkit-justify-content:space-between;justify-content:space-between;border-style:solid;border-width:1px;border-color:#e5e5e5;margin-bottom:1rem;}.css-fmyu0n:hover{-webkit-text-decoration:none;text-decoration:none;background-color:rgba(25, 118, 210, 0.04);}@media (hover: none){.css-fmyu0n:hover{background-color:transparent;}}.css-fmyu0n.Mui-disabled{color:rgba(0, 0, 0, 0.26);}</style><style data-emotion="css 1rq233s">.css-1rq233s{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;position:relative;box-sizing:border-box;-webkit-tap-highlight-color:transparent;background-color:transparent;outline:0;border:0;margin:0;border-radius:0;padding:0;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;vertical-align:middle;-moz-appearance:none;-webkit-appearance:none;-webkit-text-decoration:none;text-decoration:none;color:inherit;text-transform:none;font-family:-apple-system,"Poppins","Helvetica Neue",sans-serif,"Noto Sans","Fira Code","IBM Plex Sans","sans-serif";font-weight:500;font-size:0.875rem;line-height:1.75;min-width:64px;padding:6px 8px;border-radius:4px;-webkit-transition:background-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,border-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;transition:background-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,border-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;color:#1976d2;width:100%;height:2rem;-webkit-box-pack:justify;-webkit-justify-content:space-between;justify-content:space-between;border-style:solid;border-width:1px;border-color:#e5e5e5;margin-bottom:1rem;}.css-1rq233s::-moz-focus-inner{border-style:none;}.css-1rq233s.Mui-disabled{pointer-events:none;cursor:default;}@media print{.css-1rq233s{-webkit-print-color-adjust:exact;color-adjust:exact;}}.css-1rq233s:hover{-webkit-text-decoration:none;text-decoration:none;background-color:rgba(25, 118, 210, 0.04);}@media (hover: none){.css-1rq233s:hover{background-color:transparent;}}.css-1rq233s.Mui-disabled{color:rgba(0, 0, 0, 0.26);}</style><button class="MuiButtonBase-root MuiButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeMedium MuiButton-textSizeMedium css-1rq233s" tabindex="0" type="button" id="version-select-button" aria-haspopup="true"><style data-emotion="css 3cb5vr">.css-3cb5vr{margin:0;font-size:1rem;line-height:1.5rem;font-family:"Helvetica Neue","sans-serif";font-weight:400;font-style:normal;color:#666666;padding:0 0.25rem;font-size:0.875rem;line-height:1.25rem;}</style><div class="MuiTypography-root MuiTypography-body1 css-3cb5vr">v7.5</div><style data-emotion="css 1n4a93h">.css-1n4a93h{display:inherit;margin-right:-4px;margin-left:8px;}.css-1n4a93h>*:nth-of-type(1){font-size:20px;}</style><span class="MuiButton-endIcon MuiButton-iconSizeMedium css-1n4a93h"><style data-emotion="css b5l66">.css-b5l66{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:1em;height:1em;display:inline-block;fill:currentColor;-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;-webkit-transition:fill 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;transition:fill 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;font-size:1.5rem;-webkit-transform:rotate(0deg);-moz-transform:rotate(0deg);-ms-transform:rotate(0deg);transform:rotate(0deg);height:1.5rem;width:1.5rem;fill:#999999;margin-right:0.25rem;}</style><svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeMedium css-b5l66" focusable="false" aria-hidden="true" viewbox="0 0 24 24" data-testid="ChevronRightIcon"><path d="M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"/></svg></span></button><style data-emotion="css 1c58svf">.css-1c58svf .MuiPaper-root{border-radius:6px;margin-top:8px;min-width:268px;color:rgb(55, 65, 81);box-shadow:rgb(255, 255, 255) 0px 0px 0px 0px,rgba(0, 0, 0, 0.05) 0px 0px 0px 1px,rgba(0, 0, 0, 0.1) 0px 10px 15px -3px,rgba(0, 0, 0, 0.05) 0px 4px 6px -2px;}.css-1c58svf .MuiPaper-root .MuiMenu-list{padding:4px 0;}.css-1c58svf .MuiPaper-root .MuiMenuItem-root .MuiSvgIcon-root{font-size:18px;color:rgba(0, 0, 0, 0.6);margin-right:12px;}.css-1c58svf .MuiPaper-root .MuiMenuItem-root:active{background-color:rgba(25, 118, 210, 0.08);}</style><style data-emotion="css yvxbj">.css-yvxbj .MuiPaper-root{border-radius:6px;margin-top:8px;min-width:268px;color:rgb(55, 65, 81);box-shadow:rgb(255, 255, 255) 0px 0px 0px 0px,rgba(0, 0, 0, 0.05) 0px 0px 0px 1px,rgba(0, 0, 0, 0.1) 0px 10px 15px -3px,rgba(0, 0, 0, 0.05) 0px 4px 6px -2px;}.css-yvxbj .MuiPaper-root .MuiMenu-list{padding:4px 0;}.css-yvxbj .MuiPaper-root .MuiMenuItem-root .MuiSvgIcon-root{font-size:18px;color:rgba(0, 0, 0, 0.6);margin-right:12px;}.css-yvxbj .MuiPaper-root .MuiMenuItem-root:active{background-color:rgba(25, 118, 210, 0.08);}</style><style data-emotion="css oe3wem">.css-oe3wem .MuiPaper-root{border-radius:6px;margin-top:8px;min-width:268px;color:rgb(55, 65, 81);box-shadow:rgb(255, 255, 255) 0px 0px 0px 0px,rgba(0, 0, 0, 0.05) 0px 0px 0px 1px,rgba(0, 0, 0, 0.1) 0px 10px 15px -3px,rgba(0, 0, 0, 0.05) 0px 4px 6px -2px;}.css-oe3wem .MuiPaper-root .MuiMenu-list{padding:4px 0;}.css-oe3wem .MuiPaper-root .MuiMenuItem-root .MuiSvgIcon-root{font-size:18px;color:rgba(0, 0, 0, 0.6);margin-right:12px;}.css-oe3wem .MuiPaper-root .MuiMenuItem-root:active{background-color:rgba(25, 118, 210, 0.08);}</style><style data-emotion="css 12mehxg">.css-12mehxg{padding:0;margin:0;list-style:none;outline:0;}</style><ul role="tree" id="left-nav-treeview" aria-multiselectable="false" class="MuiTreeView-root css-12mehxg" tabindex="0" aria-label="left navigation"><style data-emotion="css 1gesgke">.css-1gesgke .MuiTreeItem-content{color:#282a36;border-radius:4px;}.css-1gesgke .MuiTreeItem-content:hover{background-color:#f9f9f9;}.css-1gesgke .MuiTreeItem-content.Mui-selected,.css-1gesgke .MuiTreeItem-content.Mui-selected.Mui-focused{background-color:var(--tree-view-bg-color, #EAF6FB);color:var(--tree-view-color, #0A85C2);}.css-1gesgke .MuiTreeItem-content.Mui-selected svg.MuiTreeItem-ChevronRightIcon,.css-1gesgke .MuiTreeItem-content.Mui-selected.Mui-focused svg.MuiTreeItem-ChevronRightIcon{fill:var(--tree-view-color, #0A85C2);}.css-1gesgke .MuiTreeItem-content.Mui-focused{background-color:#f9f9f9;}.css-1gesgke .MuiTreeItem-content .MuiTreeItem-label{font-weight:inherit;color:inherit;}.css-1gesgke .MuiTreeItem-content .MuiTreeItem-iconContainer{;}.css-1gesgke .MuiTreeItem-group{margin-left:0;}.css-1gesgke .MuiTreeItem-group .MuiTreeItem-content{padding-left:16px;}</style><style data-emotion="css 1oy5rnm">.css-1oy5rnm{list-style:none;margin:0;padding:0;outline:0;}.css-1oy5rnm .MuiTreeItem-content{color:#282a36;border-radius:4px;}.css-1oy5rnm .MuiTreeItem-content:hover{background-color:#f9f9f9;}.css-1oy5rnm .MuiTreeItem-content.Mui-selected,.css-1oy5rnm .MuiTreeItem-content.Mui-selected.Mui-focused{background-color:var(--tree-view-bg-color, #EAF6FB);color:var(--tree-view-color, #0A85C2);}.css-1oy5rnm .MuiTreeItem-content.Mui-selected svg.MuiTreeItem-ChevronRightIcon,.css-1oy5rnm .MuiTreeItem-content.Mui-selected.Mui-focused svg.MuiTreeItem-ChevronRightIcon{fill:var(--tree-view-color, #0A85C2);}.css-1oy5rnm .MuiTreeItem-content.Mui-focused{background-color:#f9f9f9;}.css-1oy5rnm .MuiTreeItem-content .MuiTreeItem-label{font-weight:inherit;color:inherit;}.css-1oy5rnm .MuiTreeItem-content .MuiTreeItem-iconContainer{;}.css-1oy5rnm .MuiTreeItem-group{margin-left:0;}.css-1oy5rnm .MuiTreeItem-group .MuiTreeItem-content{padding-left:16px;}</style><li class="MuiTreeItem-root css-1oy5rnm" role="treeitem" id="left-nav-treeview-0-0" tabindex="-1" style="margin-top:0.1875rem;margin-bottom:0.1875rem"><style data-emotion="css khel7y">.css-khel7y{padding:0 8px;width:100%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;cursor:pointer;-webkit-tap-highlight-color:transparent;}.css-khel7y:hover{background-color:rgba(0, 0, 0, 0.04);}@media (hover: none){.css-khel7y:hover{background-color:transparent;}}.css-khel7y.Mui-disabled{opacity:0.38;background-color:transparent;}.css-khel7y.Mui-focused{background-color:rgba(0, 0, 0, 0.12);}.css-khel7y.Mui-selected{background-color:rgba(25, 118, 210, 0.08);}.css-khel7y.Mui-selected:hover{background-color:rgba(25, 118, 210, 0.12);}@media (hover: none){.css-khel7y.Mui-selected:hover{background-color:rgba(25, 118, 210, 0.08);}}.css-khel7y.Mui-selected.Mui-focused{background-color:rgba(25, 118, 210, 0.2);}.css-khel7y .MuiTreeItem-iconContainer{margin-right:4px;width:15px;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;}.css-khel7y .MuiTreeItem-iconContainer svg{font-size:18px;}.css-khel7y .MuiTreeItem-label{width:100%;min-width:0;padding-left:4px;position:relative;font-size:1rem;line-height:1.5rem;font-family:"Helvetica Neue","sans-serif";font-weight:400;font-style:normal;color:#666666;}</style><div class="css-khel7y MuiTreeItem-content" style="width:inherit"><div class="MuiTreeItem-iconContainer"/><div class="MuiTreeItem-label"><style data-emotion="css znl8a3">.css-znl8a3{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;min-height:1.75rem;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding-left:0rem;padding-top:0.25rem;padding-bottom:0.25rem;}</style><div class="css-znl8a3"><style data-emotion="css tx8jsd">.css-tx8jsd{margin:0;font-size:1rem;line-height:1.5rem;font-family:"Helvetica Neue","sans-serif";font-weight:400;font-style:normal;color:#666666;}</style><a class="MuiTypography-root MuiTypography-body1 css-tx8jsd" target="_blank" href="https://docs.pingcap.com/zh" style="text-decoration:none;width:100%;color:inherit"><style data-emotion="css 8atqhb">.css-8atqhb{width:100%;}</style><div class="MuiBox-root css-8atqhb"><style data-emotion="css 1hwyipb">.css-1hwyipb{margin:0;font-size:1rem;line-height:1.5rem;font-family:"Helvetica Neue","sans-serif";font-weight:400;font-style:normal;color:#666666;color:inherit;font-size:0.875rem;line-height:1.25rem;}</style><div class="MuiTypography-root MuiTypography-body1 css-1hwyipb">文档中心</div></div></a></div></div></div></li><li class="MuiTreeItem-root css-1oy5rnm" role="treeitem" aria-expanded="false" id="left-nav-treeview-0-1" tabindex="-1" style="margin-top:0.1875rem;margin-bottom:0.1875rem"><div class="css-khel7y MuiTreeItem-content" style="width:inherit"><div class="MuiTreeItem-iconContainer"/><div class="MuiTreeItem-label"><div class="css-znl8a3"><div class="MuiBox-root css-8atqhb"><div class="MuiTypography-root MuiTypography-body1 css-1hwyipb">关于 TiDB</div></div><style data-emotion="css xjq79n">.css-xjq79n{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:1em;height:1em;display:inline-block;fill:currentColor;-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;-webkit-transition:fill 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;transition:fill 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;font-size:1.5rem;fill:#999999;height:1rem;width:1rem;margin-left:auto;-webkit-transform:none;-moz-transform:none;-ms-transform:none;transform:none;}</style><svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeMedium MuiTreeItem-ChevronRightIcon css-xjq79n" focusable="false" aria-hidden="true" viewbox="0 0 24 24" data-testid="ChevronRightIcon"><path d="M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"/></svg></div></div></div><style data-emotion="css 1jozaee">.css-1jozaee{margin:0;padding:0;margin-left:17px;}</style></li><li class="MuiTreeItem-root css-1oy5rnm" role="treeitem" aria-expanded="false" id="left-nav-treeview-0-2" tabindex="-1" style="margin-top:0.1875rem;margin-bottom:0.1875rem"><div class="css-khel7y MuiTreeItem-content" style="width:inherit"><div class="MuiTreeItem-iconContainer"/><div class="MuiTreeItem-label"><div class="css-znl8a3"><div class="MuiBox-root css-8atqhb"><div class="MuiTypography-root MuiTypography-body1 css-1hwyipb">快速上手</div></div><svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeMedium MuiTreeItem-ChevronRightIcon css-xjq79n" focusable="false" aria-hidden="true" viewbox="0 0 24 24" data-testid="ChevronRightIcon"><path d="M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"/></svg></div></div></div></li><li class="MuiTreeItem-root css-1oy5rnm" role="treeitem" aria-expanded="false" id="left-nav-treeview-0-3" tabindex="-1" style="margin-top:0.1875rem;margin-bottom:0.1875rem"><div class="css-khel7y MuiTreeItem-content" style="width:inherit"><div class="MuiTreeItem-iconContainer"/><div class="MuiTreeItem-label"><div class="css-znl8a3"><div class="MuiBox-root css-8atqhb"><div class="MuiTypography-root MuiTypography-body1 css-1hwyipb">应用开发</div></div><svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeMedium MuiTreeItem-ChevronRightIcon css-xjq79n" focusable="false" aria-hidden="true" viewbox="0 0 24 24" data-testid="ChevronRightIcon"><path d="M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"/></svg></div></div></div></li><li class="MuiTreeItem-root css-1oy5rnm" role="treeitem" aria-expanded="false" id="left-nav-treeview-0-4" tabindex="-1" style="margin-top:0.1875rem;margin-bottom:0.1875rem"><div class="css-khel7y MuiTreeItem-content" style="width:inherit"><div class="MuiTreeItem-iconContainer"/><div class="MuiTreeItem-label"><div class="css-znl8a3"><div class="MuiBox-root css-8atqhb"><div class="MuiTypography-root MuiTypography-body1 css-1hwyipb">部署标准集群</div></div><svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeMedium MuiTreeItem-ChevronRightIcon css-xjq79n" focusable="false" aria-hidden="true" viewbox="0 0 24 24" data-testid="ChevronRightIcon"><path d="M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"/></svg></div></div></div></li><li class="MuiTreeItem-root css-1oy5rnm" role="treeitem" aria-expanded="false" id="left-nav-treeview-0-5" tabindex="-1" style="margin-top:0.1875rem;margin-bottom:0.1875rem"><div class="css-khel7y MuiTreeItem-content" style="width:inherit"><div class="MuiTreeItem-iconContainer"/><div class="MuiTreeItem-label"><div class="css-znl8a3"><div class="MuiBox-root css-8atqhb"><div class="MuiTypography-root MuiTypography-body1 css-1hwyipb">数据迁移</div></div><svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeMedium MuiTreeItem-ChevronRightIcon css-xjq79n" focusable="false" aria-hidden="true" viewbox="0 0 24 24" data-testid="ChevronRightIcon"><path d="M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"/></svg></div></div></div></li><li class="MuiTreeItem-root css-1oy5rnm" role="treeitem" aria-expanded="false" id="left-nav-treeview-0-6" tabindex="-1" style="margin-top:0.1875rem;margin-bottom:0.1875rem"><div class="css-khel7y MuiTreeItem-content" style="width:inherit"><div class="MuiTreeItem-iconContainer"/><div class="MuiTreeItem-label"><div class="css-znl8a3"><div class="MuiBox-root css-8atqhb"><div class="MuiTypography-root MuiTypography-body1 css-1hwyipb">数据集成</div></div><svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeMedium MuiTreeItem-ChevronRightIcon css-xjq79n" focusable="false" aria-hidden="true" viewbox="0 0 24 24" data-testid="ChevronRightIcon"><path d="M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"/></svg></div></div></div></li><li class="MuiTreeItem-root css-1oy5rnm" role="treeitem" aria-expanded="false" id="left-nav-treeview-0-7" tabindex="-1" style="margin-top:0.1875rem;margin-bottom:0.1875rem"><div class="css-khel7y MuiTreeItem-content" style="width:inherit"><div class="MuiTreeItem-iconContainer"/><div class="MuiTreeItem-label"><div class="css-znl8a3"><div class="MuiBox-root css-8atqhb"><div class="MuiTypography-root MuiTypography-body1 css-1hwyipb">运维操作</div></div><svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeMedium MuiTreeItem-ChevronRightIcon css-xjq79n" focusable="false" aria-hidden="true" viewbox="0 0 24 24" data-testid="ChevronRightIcon"><path d="M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"/></svg></div></div></div></li><li class="MuiTreeItem-root css-1oy5rnm" role="treeitem" aria-expanded="false" id="left-nav-treeview-0-8" tabindex="-1" style="margin-top:0.1875rem;margin-bottom:0.1875rem"><div class="css-khel7y MuiTreeItem-content" style="width:inherit"><div class="MuiTreeItem-iconContainer"/><div class="MuiTreeItem-label"><div class="css-znl8a3"><div class="MuiBox-root css-8atqhb"><div class="MuiTypography-root MuiTypography-body1 css-1hwyipb">监控与告警</div></div><svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeMedium MuiTreeItem-ChevronRightIcon css-xjq79n" focusable="false" aria-hidden="true" viewbox="0 0 24 24" data-testid="ChevronRightIcon"><path d="M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"/></svg></div></div></div></li><li class="MuiTreeItem-root css-1oy5rnm" role="treeitem" aria-expanded="true" id="left-nav-treeview-0-9" tabindex="-1" style="margin-top:0.1875rem;margin-bottom:0.1875rem"><div class="css-khel7y MuiTreeItem-content Mui-expanded" style="width:inherit"><div class="MuiTreeItem-iconContainer"/><div class="MuiTreeItem-label"><div class="css-znl8a3"><div class="MuiBox-root css-8atqhb"><div class="MuiTypography-root MuiTypography-body1 css-1hwyipb">故障诊断</div></div><style data-emotion="css 171pefp">.css-171pefp{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:1em;height:1em;display:inline-block;fill:currentColor;-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;-webkit-transition:fill 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;transition:fill 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;font-size:1.5rem;fill:#999999;height:1rem;width:1rem;margin-left:auto;-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg);}</style><svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeMedium MuiTreeItem-ChevronRightIcon css-171pefp" focusable="false" aria-hidden="true" viewbox="0 0 24 24" data-testid="ChevronRightIcon"><path d="M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"/></svg></div></div></div><style data-emotion="css 1xxsnna">.css-1xxsnna{height:auto;overflow:visible;-webkit-transition:height 300ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;transition:height 300ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;margin:0;padding:0;margin-left:17px;}</style><ul class="MuiCollapse-root MuiCollapse-vertical MuiTreeItem-group MuiCollapse-entered css-1xxsnna" style="min-height:0px" role="group"><div class="MuiCollapse-wrapper MuiCollapse-vertical css-hboir5"><div class="MuiCollapse-wrapperInner MuiCollapse-vertical css-8atqhb"><li class="MuiTreeItem-root css-1oy5rnm" role="treeitem" aria-expanded="false" id="left-nav-treeview-0-9-0" tabindex="-1" style="margin-top:0.1875rem;margin-bottom:0.1875rem"><div class="css-khel7y MuiTreeItem-content" style="width:inherit"><div class="MuiTreeItem-iconContainer"/><div class="MuiTreeItem-label"><style data-emotion="css kb2j4b">.css-kb2j4b{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;min-height:1.75rem;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding-left:0.5rem;padding-top:0.25rem;padding-bottom:0.25rem;}</style><div class="css-kb2j4b"><div class="MuiBox-root css-8atqhb"><div class="MuiTypography-root MuiTypography-body1 css-1hwyipb">故障诊断问题汇总</div></div><svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeMedium MuiTreeItem-ChevronRightIcon css-xjq79n" focusable="false" aria-hidden="true" viewbox="0 0 24 24" data-testid="ChevronRightIcon"><path d="M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"/></svg></div></div></div></li><li class="MuiTreeItem-root css-1oy5rnm" role="treeitem" aria-expanded="true" id="left-nav-treeview-0-9-1" tabindex="-1" style="margin-top:0.1875rem;margin-bottom:0.1875rem"><div class="css-khel7y MuiTreeItem-content Mui-expanded" style="width:inherit"><div class="MuiTreeItem-iconContainer"/><div class="MuiTreeItem-label"><div class="css-kb2j4b"><div class="MuiBox-root css-8atqhb"><div class="MuiTypography-root MuiTypography-body1 css-1hwyipb">故障场景</div></div><svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeMedium MuiTreeItem-ChevronRightIcon css-171pefp" focusable="false" aria-hidden="true" viewbox="0 0 24 24" data-testid="ChevronRightIcon"><path d="M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"/></svg></div></div></div><ul class="MuiCollapse-root MuiCollapse-vertical MuiTreeItem-group MuiCollapse-entered css-1xxsnna" style="min-height:0px" role="group"><div class="MuiCollapse-wrapper MuiCollapse-vertical css-hboir5"><div class="MuiCollapse-wrapperInner MuiCollapse-vertical css-8atqhb"><li class="MuiTreeItem-root css-1oy5rnm" role="treeitem" aria-expanded="true" id="left-nav-treeview-0-9-1-0" tabindex="-1" style="margin-top:0.1875rem;margin-bottom:0.1875rem"><div class="css-khel7y MuiTreeItem-content Mui-expanded" style="width:inherit"><div class="MuiTreeItem-iconContainer"/><div class="MuiTreeItem-label"><style data-emotion="css snygwd">.css-snygwd{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;min-height:1.75rem;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding-left:1rem;padding-top:0.25rem;padding-bottom:0.25rem;}</style><div class="css-snygwd"><div class="MuiBox-root css-8atqhb"><div class="MuiTypography-root MuiTypography-body1 css-1hwyipb">慢查询</div></div><svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeMedium MuiTreeItem-ChevronRightIcon css-171pefp" focusable="false" aria-hidden="true" viewbox="0 0 24 24" data-testid="ChevronRightIcon"><path d="M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"/></svg></div></div></div><ul class="MuiCollapse-root MuiCollapse-vertical MuiTreeItem-group MuiCollapse-entered css-1xxsnna" style="min-height:0px" role="group"><div class="MuiCollapse-wrapper MuiCollapse-vertical css-hboir5"><div class="MuiCollapse-wrapperInner MuiCollapse-vertical css-8atqhb"><li class="MuiTreeItem-root css-1oy5rnm" role="treeitem" id="left-nav-treeview-0-9-1-0-0" tabindex="-1" style="margin-top:0.1875rem;margin-bottom:0.1875rem"><div class="css-khel7y MuiTreeItem-content Mui-expanded" style="width:inherit"><div class="MuiTreeItem-iconContainer"/><div class="MuiTreeItem-label"><style data-emotion="css 5fc025">.css-5fc025{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;min-height:1.75rem;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding-left:1.5rem;padding-top:0.25rem;padding-bottom:0.25rem;}</style><div class="css-5fc025"><a aria-current="page" style="text-decoration:none;width:100%;color:inherit" class="" href="/zh/tidb/stable/identify-slow-queries"><div class="MuiBox-root css-8atqhb"><div class="MuiTypography-root MuiTypography-body1 css-1hwyipb">定位慢查询</div></div></a></div></div></div></li><li class="MuiTreeItem-root css-1oy5rnm" role="treeitem" id="left-nav-treeview-0-9-1-0-1" tabindex="-1" style="margin-top:0.1875rem;margin-bottom:0.1875rem"><div class="css-khel7y MuiTreeItem-content" style="width:inherit"><div class="MuiTreeItem-iconContainer"/><div class="MuiTreeItem-label"><div class="css-5fc025"><a style="text-decoration:none;width:100%;color:inherit" href="/zh/tidb/stable/analyze-slow-queries"><div class="MuiBox-root css-8atqhb"><div class="MuiTypography-root MuiTypography-body1 css-1hwyipb">分析慢查询</div></div></a></div></div></div></li></div></div></ul></li><li class="MuiTreeItem-root css-1oy5rnm" role="treeitem" id="left-nav-treeview-0-9-1-1" tabindex="-1" style="margin-top:0.1875rem;margin-bottom:0.1875rem"><div class="css-khel7y MuiTreeItem-content" style="width:inherit"><div class="MuiTreeItem-iconContainer"/><div class="MuiTreeItem-label"><div class="css-snygwd"><a style="text-decoration:none;width:100%;color:inherit" href="/zh/tidb/stable/troubleshoot-tidb-oom"><div class="MuiBox-root css-8atqhb"><div class="MuiTypography-root MuiTypography-body1 css-1hwyipb">TiDB OOM 故障排查</div></div></a></div></div></div></li><li class="MuiTreeItem-root css-1oy5rnm" role="treeitem" id="left-nav-treeview-0-9-1-2" tabindex="-1" style="margin-top:0.1875rem;margin-bottom:0.1875rem"><div class="css-khel7y MuiTreeItem-content" style="width:inherit"><div class="MuiTreeItem-iconContainer"/><div class="MuiTreeItem-label"><div class="css-snygwd"><a style="text-decoration:none;width:100%;color:inherit" href="/zh/tidb/stable/troubleshoot-hot-spot-issues"><div class="MuiBox-root css-8atqhb"><div class="MuiTypography-root MuiTypography-body1 css-1hwyipb">热点问题处理</div></div></a></div></div></div></li><li class="MuiTreeItem-root css-1oy5rnm" role="treeitem" id="left-nav-treeview-0-9-1-3" tabindex="-1" style="margin-top:0.1875rem;margin-bottom:0.1875rem"><div class="css-khel7y MuiTreeItem-content" style="width:inherit"><div class="MuiTreeItem-iconContainer"/><div class="MuiTreeItem-label"><div class="css-snygwd"><a style="text-decoration:none;width:100%;color:inherit" href="/zh/tidb/stable/troubleshoot-cpu-issues"><div class="MuiBox-root css-8atqhb"><div class="MuiTypography-root MuiTypography-body1 css-1hwyipb">CPU 占用过多导致读写延迟增加</div></div></a></div></div></div></li><li class="MuiTreeItem-root css-1oy5rnm" role="treeitem" id="left-nav-treeview-0-9-1-4" tabindex="-1" style="margin-top:0.1875rem;margin-bottom:0.1875rem"><div class="css-khel7y MuiTreeItem-content" style="width:inherit"><div class="MuiTreeItem-iconContainer"/><div class="MuiTreeItem-label"><div class="css-snygwd"><a style="text-decoration:none;width:100%;color:inherit" href="/zh/tidb/stable/troubleshoot-write-conflicts"><div class="MuiBox-root css-8atqhb"><div class="MuiTypography-root MuiTypography-body1 css-1hwyipb">写冲突与写性能下降</div></div></a></div></div></div></li><li class="MuiTreeItem-root css-1oy5rnm" role="treeitem" id="left-nav-treeview-0-9-1-5" tabindex="-1" style="margin-top:0.1875rem;margin-bottom:0.1875rem"><div class="css-khel7y MuiTreeItem-content" style="width:inherit"><div class="MuiTreeItem-iconContainer"/><div class="MuiTreeItem-label"><div class="css-snygwd"><a style="text-decoration:none;width:100%;color:inherit" href="/zh/tidb/stable/troubleshoot-high-disk-io"><div class="MuiBox-root css-8atqhb"><div class="MuiTypography-root MuiTypography-body1 css-1hwyipb">磁盘 I/O 过高</div></div></a></div></div></div></li><li class="MuiTreeItem-root css-1oy5rnm" role="treeitem" id="left-nav-treeview-0-9-1-6" tabindex="-1" style="margin-top:0.1875rem;margin-bottom:0.1875rem"><div class="css-khel7y MuiTreeItem-content" style="width:inherit"><div class="MuiTreeItem-iconContainer"/><div class="MuiTreeItem-label"><div class="css-snygwd"><a style="text-decoration:none;width:100%;color:inherit" href="/zh/tidb/stable/troubleshoot-lock-conflicts"><div class="MuiBox-root css-8atqhb"><div class="MuiTypography-root MuiTypography-body1 css-1hwyipb">锁冲突与 TTL 超时</div></div></a></div></div></div></li><li class="MuiTreeItem-root css-1oy5rnm" role="treeitem" id="left-nav-treeview-0-9-1-7" tabindex="-1" style="margin-top:0.1875rem;margin-bottom:0.1875rem"><div class="css-khel7y MuiTreeItem-content" style="width:inherit"><div class="MuiTreeItem-iconContainer"/><div class="MuiTreeItem-label"><div class="css-snygwd"><a style="text-decoration:none;width:100%;color:inherit" href="/zh/tidb/stable/troubleshoot-data-inconsistency-errors"><div class="MuiBox-root css-8atqhb"><div class="MuiTypography-root MuiTypography-body1 css-1hwyipb">数据索引不一致报错</div></div></a></div></div></div></li></div></div></ul></li><li class="MuiTreeItem-root css-1oy5rnm" role="treeitem" aria-expanded="false" id="left-nav-treeview-0-9-2" tabindex="-1" style="margin-top:0.1875rem;margin-bottom:0.1875rem"><div class="css-khel7y MuiTreeItem-content" style="width:inherit"><div class="MuiTreeItem-iconContainer"/><div class="MuiTreeItem-label"><div class="css-kb2j4b"><div class="MuiBox-root css-8atqhb"><div class="MuiTypography-root MuiTypography-body1 css-1hwyipb">故障诊断方法</div></div><svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeMedium MuiTreeItem-ChevronRightIcon css-xjq79n" focusable="false" aria-hidden="true" viewbox="0 0 24 24" data-testid="ChevronRightIcon"><path d="M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"/></svg></div></div></div></li><li class="MuiTreeItem-root css-1oy5rnm" role="treeitem" id="left-nav-treeview-0-9-3" tabindex="-1" style="margin-top:0.1875rem;margin-bottom:0.1875rem"><div class="css-khel7y MuiTreeItem-content" style="width:inherit"><div class="MuiTreeItem-iconContainer"/><div class="MuiTreeItem-label"><div class="css-kb2j4b"><a style="text-decoration:none;width:100%;color:inherit" href="/zh/tidb/stable/support"><div class="MuiBox-root css-8atqhb"><div class="MuiTypography-root MuiTypography-body1 css-1hwyipb">获取支持</div></div></a></div></div></div></li></div></div></ul></li><li class="MuiTreeItem-root css-1oy5rnm" role="treeitem" aria-expanded="false" id="left-nav-treeview-0-10" tabindex="-1" style="margin-top:0.1875rem;margin-bottom:0.1875rem"><div class="css-khel7y MuiTreeItem-content" style="width:inherit"><div class="MuiTreeItem-iconContainer"/><div class="MuiTreeItem-label"><div class="css-znl8a3"><div class="MuiBox-root css-8atqhb"><div class="MuiTypography-root MuiTypography-body1 css-1hwyipb">性能调优</div></div><svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeMedium MuiTreeItem-ChevronRightIcon css-xjq79n" focusable="false" aria-hidden="true" viewbox="0 0 24 24" data-testid="ChevronRightIcon"><path d="M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"/></svg></div></div></div></li><li class="MuiTreeItem-root css-1oy5rnm" role="treeitem" aria-expanded="false" id="left-nav-treeview-0-11" tabindex="-1" style="margin-top:0.1875rem;margin-bottom:0.1875rem"><div class="css-khel7y MuiTreeItem-content" style="width:inherit"><div class="MuiTreeItem-iconContainer"/><div class="MuiTreeItem-label"><div class="css-znl8a3"><div class="MuiBox-root css-8atqhb"><div class="MuiTypography-root MuiTypography-body1 css-1hwyipb">教程</div></div><svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeMedium MuiTreeItem-ChevronRightIcon css-xjq79n" focusable="false" aria-hidden="true" viewbox="0 0 24 24" data-testid="ChevronRightIcon"><path d="M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"/></svg></div></div></div></li><li class="MuiTreeItem-root css-1oy5rnm" role="treeitem" aria-expanded="false" id="left-nav-treeview-0-12" tabindex="-1" style="margin-top:0.1875rem;margin-bottom:0.1875rem"><div class="css-khel7y MuiTreeItem-content" style="width:inherit"><div class="MuiTreeItem-iconContainer"/><div class="MuiTreeItem-label"><div class="css-znl8a3"><div class="MuiBox-root css-8atqhb"><div class="MuiTypography-root MuiTypography-body1 css-1hwyipb">TiDB 工具</div></div><svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeMedium MuiTreeItem-ChevronRightIcon css-xjq79n" focusable="false" aria-hidden="true" viewbox="0 0 24 24" data-testid="ChevronRightIcon"><path d="M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"/></svg></div></div></div></li><li class="MuiTreeItem-root css-1oy5rnm" role="treeitem" aria-expanded="false" id="left-nav-treeview-0-13" tabindex="-1" style="margin-top:0.1875rem;margin-bottom:0.1875rem"><div class="css-khel7y MuiTreeItem-content" style="width:inherit"><div class="MuiTreeItem-iconContainer"/><div class="MuiTreeItem-label"><div class="css-znl8a3"><div class="MuiBox-root css-8atqhb"><div class="MuiTypography-root MuiTypography-body1 css-1hwyipb">参考指南</div></div><svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeMedium MuiTreeItem-ChevronRightIcon css-xjq79n" focusable="false" aria-hidden="true" viewbox="0 0 24 24" data-testid="ChevronRightIcon"><path d="M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"/></svg></div></div></div></li><li class="MuiTreeItem-root css-1oy5rnm" role="treeitem" aria-expanded="false" id="left-nav-treeview-0-14" tabindex="-1" style="margin-top:0.1875rem;margin-bottom:0.1875rem"><div class="css-khel7y MuiTreeItem-content" style="width:inherit"><div class="MuiTreeItem-iconContainer"/><div class="MuiTreeItem-label"><div class="css-znl8a3"><div class="MuiBox-root css-8atqhb"><div class="MuiTypography-root MuiTypography-body1 css-1hwyipb">常见问题解答 (FAQ)</div></div><svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeMedium MuiTreeItem-ChevronRightIcon css-xjq79n" focusable="false" aria-hidden="true" viewbox="0 0 24 24" data-testid="ChevronRightIcon"><path d="M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"/></svg></div></div></div></li><li class="MuiTreeItem-root css-1oy5rnm" role="treeitem" aria-expanded="false" id="left-nav-treeview-0-15" tabindex="-1" style="margin-top:0.1875rem;margin-bottom:0.1875rem"><div class="css-khel7y MuiTreeItem-content" style="width:inherit"><div class="MuiTreeItem-iconContainer"/><div class="MuiTreeItem-label"><div class="css-znl8a3"><div class="MuiBox-root css-8atqhb"><div class="MuiTypography-root MuiTypography-body1 css-1hwyipb">版本发布历史</div></div><svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeMedium MuiTreeItem-ChevronRightIcon css-xjq79n" focusable="false" aria-hidden="true" viewbox="0 0 24 24" data-testid="ChevronRightIcon"><path d="M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"/></svg></div></div></div></li><li class="MuiTreeItem-root css-1oy5rnm" role="treeitem" id="left-nav-treeview-0-16" tabindex="-1" style="margin-top:0.1875rem;margin-bottom:0.1875rem"><div class="css-khel7y MuiTreeItem-content" style="width:inherit"><div class="MuiTreeItem-iconContainer"/><div class="MuiTreeItem-label"><div class="css-znl8a3"><a style="text-decoration:none;width:100%;color:inherit" href="/zh/tidb/stable/glossary"><div class="MuiBox-root css-8atqhb"><div class="MuiTypography-root MuiTypography-body1 css-1hwyipb">术语表</div></div></a></div></div></div></li></ul></div></aside><style data-emotion="css sb2sd0">.css-sb2sd0{width:100%;}@media (min-width:1200px){.css-sb2sd0{max-width:calc(100% - 18.75rem);}}</style><main class="MuiBox-root css-sb2sd0"><style data-emotion="css 1rnnmjb">.css-1rnnmjb{max-width:1340px;width:100%;margin-left:auto;margin-right:auto;display:block;box-sizing:border-box;}</style><div class="MuiBox-root css-1rnnmjb"><style data-emotion="css 90fn5w">.css-90fn5w{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;}@media (min-width:0px){.css-90fn5w{-webkit-flex-direction:column-reverse;-ms-flex-direction:column-reverse;flex-direction:column-reverse;}}@media (min-width:600px){.css-90fn5w{-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;}}</style><div class="css-90fn5w"><style data-emotion="css vofosd">.css-vofosd{padding:1.5rem 0;}@media (min-width:0px){.css-vofosd{width:100%;}}@media (min-width:600px){.css-vofosd{width:calc(100% - 17.5rem);}}</style><div class="MuiBox-root css-vofosd"><style data-emotion="css 1ekb41w">.css-1ekb41w{width:100%;margin-left:auto;box-sizing:border-box;margin-right:auto;display:block;padding-left:16px;padding-right:16px;}@media (min-width:600px){.css-1ekb41w{padding-left:24px;padding-right:24px;}}@media (min-width:1536px){.css-1ekb41w{max-width:1536px;}}</style><div class="MuiContainer-root MuiContainer-maxWidthXl doc-content css-1ekb41w"><div class="markdown-body MuiBox-root css-0"><h1 id="慢查询日志" style="position:relative"><a href="#%E6%85%A2%E6%9F%A5%E8%AF%A2%E6%97%A5%E5%BF%97" aria-label="慢查询日志 permalink" class="anchor before"><svg aria-hidden="true" focusable="false" height="16" version="1.1" viewbox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"/></svg></a>慢查询日志</h1><p>TiDB 会将执行时间超过 <a href="/zh/tidb/stable/system-variables#tidb_slow_log_threshold"><code>tidb_slow_log_threshold</code></a>(默认值为 300 毫秒)的语句输出到 <a href="/zh/tidb/stable/tidb-configuration-file#slow-query-file">slow-query-file</a>(默认值为 "tidb-slow.log")日志文件中,用于帮助用户定位慢查询语句,分析和解决 SQL 执行的性能问题。</p><p>TiDB 默认启用慢查询日志,可以修改系统变量 <a href="/zh/tidb/stable/system-variables#tidb_enable_slow_log"><code>tidb_enable_slow_log</code></a> 来启用或禁用它。</p><h2 id="日志示例" style="position:relative"><a href="#%E6%97%A5%E5%BF%97%E7%A4%BA%E4%BE%8B" aria-label="日志示例 permalink" class="anchor before"><svg aria-hidden="true" focusable="false" height="16" version="1.1" viewbox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"/></svg></a>日志示例</h2><pre><code class="hljs language-sql"><style data-emotion="css 1qhimia">.css-1qhimia{margin-right:3rem;overflow:auto;}</style><div class="MuiBox-root css-1qhimia"># <span class="hljs-type">Time</span>: <span class="hljs-number">2019</span><span class="hljs-number">-08</span><span class="hljs-number">-14</span>T09:<span class="hljs-number">26</span>:<span class="hljs-number">59.487776265</span><span class="hljs-operator">+</span><span class="hljs-number">08</span>:<span class="hljs-number">00</span> # Txn_start_ts: <span class="hljs-number">410450924122144769</span> # <span class="hljs-keyword">User</span><span class="hljs-variable">@Host</span>: root[root] @ localhost [<span class="hljs-number">127.0</span><span class="hljs-number">.0</span><span class="hljs-number">.1</span>] # Conn_ID: <span class="hljs-number">3086</span> # Exec_retry_time: <span class="hljs-number">5.1</span> Exec_retry_count: <span class="hljs-number">3</span> # Query_time: <span class="hljs-number">1.527627037</span> # Parse_time: <span class="hljs-number">0.000054933</span> # Compile_time: <span class="hljs-number">0.000129729</span> # Rewrite_time: <span class="hljs-number">0.000000003</span> Preproc_subqueries: <span class="hljs-number">2</span> Preproc_subqueries_time: <span class="hljs-number">0.000000002</span> # Optimize_time: <span class="hljs-number">0.00000001</span> # Wait_TS: <span class="hljs-number">0.00001078</span> # Process_time: <span class="hljs-number">0.07</span> Request_count: <span class="hljs-number">1</span> Total_keys: <span class="hljs-number">131073</span> Process_keys: <span class="hljs-number">131072</span> Prewrite_time: <span class="hljs-number">0.335415029</span> Commit_time: <span class="hljs-number">0.032175429</span> Get_commit_ts_time: <span class="hljs-number">0.000177098</span> Local_latch_wait_time: <span class="hljs-number">0.106869448</span> Write_keys: <span class="hljs-number">131072</span> Write_size: <span class="hljs-number">3538944</span> Prewrite_region: <span class="hljs-number">1</span> # DB: test # Is_internal: <span class="hljs-literal">false</span> # Digest: <span class="hljs-number">50</span>a2e32d2abbd6c1764b1b7f2058d428ef2712b029282b776beb9506a365c0f1 # Stats: t:pseudo # Num_cop_tasks: <span class="hljs-number">1</span> # Cop_proc_avg: <span class="hljs-number">0.07</span> Cop_proc_p90: <span class="hljs-number">0.07</span> Cop_proc_max: <span class="hljs-number">0.07</span> Cop_proc_addr: <span class="hljs-number">172.16</span><span class="hljs-number">.5</span><span class="hljs-number">.87</span>:<span class="hljs-number">20171</span> # Cop_wait_avg: <span class="hljs-number">0</span> Cop_wait_p90: <span class="hljs-number">0</span> Cop_wait_max: <span class="hljs-number">0</span> Cop_wait_addr: <span class="hljs-number">172.16</span><span class="hljs-number">.5</span><span class="hljs-number">.87</span>:<span class="hljs-number">20171</span> # Cop_backoff_regionMiss_total_times: <span class="hljs-number">200</span> Cop_backoff_regionMiss_total_time: <span class="hljs-number">0.2</span> Cop_backoff_regionMiss_max_time: <span class="hljs-number">0.2</span> Cop_backoff_regionMiss_max_addr: <span class="hljs-number">127.0</span><span class="hljs-number">.0</span><span class="hljs-number">.1</span> Cop_backoff_regionMiss_avg_time: <span class="hljs-number">0.2</span> Cop_backoff_regionMiss_p90_time: <span class="hljs-number">0.2</span> # Cop_backoff_rpcPD_total_times: <span class="hljs-number">200</span> Cop_backoff_rpcPD_total_time: <span class="hljs-number">0.2</span> Cop_backoff_rpcPD_max_time: <span class="hljs-number">0.2</span> Cop_backoff_rpcPD_max_addr: <span class="hljs-number">127.0</span><span class="hljs-number">.0</span><span class="hljs-number">.1</span> Cop_backoff_rpcPD_avg_time: <span class="hljs-number">0.2</span> Cop_backoff_rpcPD_p90_time: <span class="hljs-number">0.2</span> # Cop_backoff_rpcTiKV_total_times: <span class="hljs-number">200</span> Cop_backoff_rpcTiKV_total_time: <span class="hljs-number">0.2</span> Cop_backoff_rpcTiKV_max_time: <span class="hljs-number">0.2</span> Cop_backoff_rpcTiKV_max_addr: <span class="hljs-number">127.0</span><span class="hljs-number">.0</span><span class="hljs-number">.1</span> Cop_backoff_rpcTiKV_avg_time: <span class="hljs-number">0.2</span> Cop_backoff_rpcTiKV_p90_time: <span class="hljs-number">0.2</span> # Mem_max: <span class="hljs-number">525211</span> # Disk_max: <span class="hljs-number">65536</span> # Prepared: <span class="hljs-literal">false</span> # Plan_from_cache: <span class="hljs-literal">false</span> # Succ: <span class="hljs-literal">true</span> # Plan: tidb_decode_plan(<span class="hljs-string">'ZJAwCTMyXzcJMAkyMAlkYXRhOlRhYmxlU2Nhbl82CjEJMTBfNgkxAR0AdAEY1Dp0LCByYW5nZTpbLWluZiwraW5mXSwga2VlcCBvcmRlcjpmYWxzZSwgc3RhdHM6cHNldWRvCg=='</span>) use test; <span class="hljs-keyword">insert</span> <span class="hljs-keyword">into</span> t <span class="hljs-keyword">select</span> <span class="hljs-operator">*</span> <span class="hljs-keyword">from</span> t; </div><style data-emotion="css ux9q70">.css-ux9q70{text-align:center;-webkit-flex:0 0 auto;-ms-flex:0 0 auto;flex:0 0 auto;font-size:1.5rem;padding:8px;border-radius:50%;overflow:visible;color:rgba(0, 0, 0, 0.54);-webkit-transition:background-color 150ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;transition:background-color 150ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;padding:5px;font-size:1.125rem;top:0.625rem;right:2.4rem;background:transparent;border:unset;}.css-ux9q70:hover{background-color:rgba(0, 0, 0, 0.04);}@media (hover: none){.css-ux9q70:hover{background-color:transparent;}}.css-ux9q70.Mui-disabled{background-color:transparent;color:rgba(0, 0, 0, 0.26);}</style><style data-emotion="css 1rmx1rm">.css-1rmx1rm{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;position:relative;box-sizing:border-box;-webkit-tap-highlight-color:transparent;background-color:transparent;outline:0;border:0;margin:0;border-radius:0;padding:0;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;vertical-align:middle;-moz-appearance:none;-webkit-appearance:none;-webkit-text-decoration:none;text-decoration:none;color:inherit;text-align:center;-webkit-flex:0 0 auto;-ms-flex:0 0 auto;flex:0 0 auto;font-size:1.5rem;padding:8px;border-radius:50%;overflow:visible;color:rgba(0, 0, 0, 0.54);-webkit-transition:background-color 150ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;transition:background-color 150ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;padding:5px;font-size:1.125rem;top:0.625rem;right:2.4rem;background:transparent;border:unset;}.css-1rmx1rm::-moz-focus-inner{border-style:none;}.css-1rmx1rm.Mui-disabled{pointer-events:none;cursor:default;}@media print{.css-1rmx1rm{-webkit-print-color-adjust:exact;color-adjust:exact;}}.css-1rmx1rm:hover{background-color:rgba(0, 0, 0, 0.04);}@media (hover: none){.css-1rmx1rm:hover{background-color:transparent;}}.css-1rmx1rm.Mui-disabled{background-color:transparent;color:rgba(0, 0, 0, 0.26);}</style><button class="MuiButtonBase-root MuiIconButton-root MuiIconButton-sizeSmall css-1rmx1rm" tabindex="0" type="button" aria-label="Toggle code wrap"><style data-emotion="css 1cw4hi4">.css-1cw4hi4{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:1em;height:1em;display:inline-block;fill:currentColor;-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;-webkit-transition:fill 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;transition:fill 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;font-size:inherit;}</style><svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeInherit css-1cw4hi4" focusable="false" aria-hidden="true" viewbox="0 0 24 24" data-testid="WrapTextIcon"><path d="M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3 3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"/></svg></button><style data-emotion="css 1e2dcm1">.css-1e2dcm1{z-index:1500;pointer-events:none;}</style><style data-emotion="css okvapm">.css-okvapm{z-index:1500;pointer-events:none;}</style><style data-emotion="css rnn29l">.css-rnn29l{text-align:center;-webkit-flex:0 0 auto;-ms-flex:0 0 auto;flex:0 0 auto;font-size:1.5rem;padding:8px;border-radius:50%;overflow:visible;color:rgba(0, 0, 0, 0.54);-webkit-transition:background-color 150ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;transition:background-color 150ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;padding:5px;font-size:1.125rem;top:0.625rem;right:0.625rem;background:transparent;border:unset;}.css-rnn29l:hover{background-color:rgba(0, 0, 0, 0.04);}@media (hover: none){.css-rnn29l:hover{background-color:transparent;}}.css-rnn29l.Mui-disabled{background-color:transparent;color:rgba(0, 0, 0, 0.26);}</style><style data-emotion="css fxo539">.css-fxo539{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;position:relative;box-sizing:border-box;-webkit-tap-highlight-color:transparent;background-color:transparent;outline:0;border:0;margin:0;border-radius:0;padding:0;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;vertical-align:middle;-moz-appearance:none;-webkit-appearance:none;-webkit-text-decoration:none;text-decoration:none;color:inherit;text-align:center;-webkit-flex:0 0 auto;-ms-flex:0 0 auto;flex:0 0 auto;font-size:1.5rem;padding:8px;border-radius:50%;overflow:visible;color:rgba(0, 0, 0, 0.54);-webkit-transition:background-color 150ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;transition:background-color 150ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;padding:5px;font-size:1.125rem;top:0.625rem;right:0.625rem;background:transparent;border:unset;}.css-fxo539::-moz-focus-inner{border-style:none;}.css-fxo539.Mui-disabled{pointer-events:none;cursor:default;}@media print{.css-fxo539{-webkit-print-color-adjust:exact;color-adjust:exact;}}.css-fxo539:hover{background-color:rgba(0, 0, 0, 0.04);}@media (hover: none){.css-fxo539:hover{background-color:transparent;}}.css-fxo539.Mui-disabled{background-color:transparent;color:rgba(0, 0, 0, 0.26);}</style><button class="MuiButtonBase-root MuiIconButton-root MuiIconButton-sizeSmall css-fxo539" tabindex="0" type="button" aria-label="copy"><svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeInherit css-1cw4hi4" focusable="false" aria-hidden="true" viewbox="0 0 24 24" data-testid="ContentCopyIcon"><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"/></svg></button></code></pre><h2 id="字段含义说明" style="position:relative"><a href="#%E5%AD%97%E6%AE%B5%E5%90%AB%E4%B9%89%E8%AF%B4%E6%98%8E" aria-label="字段含义说明 permalink" class="anchor before"><svg aria-hidden="true" focusable="false" height="16" version="1.1" viewbox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"/></svg></a>字段含义说明</h2><style data-emotion="css 1weqspv">.css-1weqspv{padding-top:0.5rem;padding-bottom:0.5rem;}.css-1weqspv .MuiAlert-message p{margin-bottom:0px;margin-top:0px;}</style><div class="MuiBox-root css-1weqspv"><style data-emotion="css 17zlexa">.css-17zlexa{font-size:0.875rem;line-height:1.25rem;font-family:"Helvetica Neue","sans-serif";font-weight:400;font-style:normal;color:rgb(1, 67, 97);background-color:rgb(229, 246, 253);display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;padding:6px 16px;}.css-17zlexa .MuiAlert-icon{color:#03a9f4;}</style><style data-emotion="css 152gid5">.css-152gid5{background-color:#fff;color:rgba(0, 0, 0, 0.87);-webkit-transition:box-shadow 300ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;transition:box-shadow 300ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;border-radius:4px;box-shadow:none;font-size:0.875rem;line-height:1.25rem;font-family:"Helvetica Neue","sans-serif";font-weight:400;font-style:normal;color:rgb(1, 67, 97);background-color:rgb(229, 246, 253);display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;padding:6px 16px;}.css-152gid5 .MuiAlert-icon{color:#03a9f4;}</style><div class="MuiPaper-root MuiPaper-elevation MuiPaper-rounded MuiPaper-elevation0 MuiAlert-root MuiAlert-standardInfo MuiAlert-standard css-152gid5" role="alert"><style data-emotion="css 1l54tgj">.css-1l54tgj{margin-right:12px;padding:7px 0;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;font-size:22px;opacity:0.9;}</style><div class="MuiAlert-icon css-1l54tgj"><svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeInherit css-1cw4hi4" focusable="false" aria-hidden="true" viewbox="0 0 24 24" data-testid="InfoOutlinedIcon"><path d="M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20, 12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10, 10 0 0,0 12,2M11,17H13V11H11V17Z"/></svg></div><style data-emotion="css 1xsto0d">.css-1xsto0d{padding:8px 0;min-width:0;overflow:auto;}</style><div class="MuiAlert-message css-1xsto0d"><style data-emotion="css 1h2y6o4">.css-1h2y6o4{font-weight:500;margin-top:-2px;}</style><style data-emotion="css 17ioyuk">.css-17ioyuk{margin:0;font-size:1rem;line-height:1.5rem;font-family:"Helvetica Neue","sans-serif";font-weight:400;font-style:normal;color:#666666;margin-bottom:0.35em;font-weight:500;margin-top:-2px;}</style><div class="MuiTypography-root MuiTypography-body1 MuiTypography-gutterBottom MuiAlertTitle-root css-17ioyuk">注意</div><p>慢查询日志中所有时间相关字段的单位都是 <strong>“秒”</strong></p></div></div></div><p>Slow Query 基础信息:</p><ul><li><code>Time</code>:表示日志打印时间。</li><li><code>Query_time</code>:表示执行这个语句花费的时间。</li><li><code>Parse_time</code>:表示这个语句在语法解析阶段花费的时间。</li><li><code>Compile_time</code>:表示这个语句在查询优化阶段花费的时间。</li><li><code>Optimize_time</code>:表示这个语句在优化查询计划阶段花费的时间。</li><li><code>Wait_TS</code>:表示这个语句在等待获取事务 TS 阶段花费的时间。</li><li><code>Query</code>:表示 SQL 语句。慢日志里面不会打印 <code>Query</code>,但映射到内存表后,对应的字段叫 <code>Query</code>。</li><li><code>Digest</code>:表示 SQL 语句的指纹。</li><li><code>Txn_start_ts</code>:表示事务的开始时间戳,也是事务的唯一 ID,可以用这个值在 TiDB 日志中查找事务相关的其他日志。</li><li><code>Is_internal</code>:表示是否为 TiDB 内部的 SQL 语句。<code>true</code> 表示 TiDB 系统内部执行的 SQL 语句,<code>false</code> 表示用户执行的 SQL 语句。</li><li><code>Index_names</code>:表示这个语句执行用到的索引。</li><li><code>Stats</code>:表示这个语句使用到的统计信息的健康状态、内部版本号、总行数、修改行数以及加载状态。<code>pseudo</code> 状态表示统计信息不健康。如果有尝试使用但没有完全加载的统计信息,会在之后输出其内部状态。例如,<code>t1:439478225786634241[105000;5000][col1:allEvicted][idx1:allEvicted]</code> 的含义如下:<ul><li><code>t1</code>:本次查询优化过程中使用了 <code>t1</code> 表上的统计信息</li><li><code>439478225786634241</code>:其内部版本号</li><li><code>105000</code>:统计信息中维护的总行数</li><li><code>5000</code>:自上次收集统计信息以来记录的修改的行数</li><li><code>col1:allEvicted</code>:<code>col1</code> 列对应的统计信息没有完全加载</li><li><code>idx1:allEvicted</code>:<code>idx1</code> 索引对应的统计信息没有完全加载</li></ul></li><li><code>Succ</code>:表示语句是否执行成功。</li><li><code>Backoff_time</code>:表示语句遇到需要重试的错误时在重试前等待的时间。常见的需要重试的错误有以下几种:遇到了 lock、Region 分裂、<code>tikv server is busy</code>。</li><li><code>Plan</code>:表示语句的执行计划,用 <code>select tidb_decode_plan('xxx...')</code> SQL 语句可以解析出具体的执行计划。</li><li><code>Binary_plan</code>:表示以二进制格式编码后的语句的执行计划,用 <code>select tidb_decode_binary_plan('xxx...')</code> SQL 语句可以解析出具体的执行计划。传递的信息和 <code>Plan</code> 字段基本相同,但是解析出的执行计划的格式会和 <code>Plan</code> 字段不同。</li><li><code>Prepared</code>:表示这个语句是否是 <code>Prepare</code> 或 <code>Execute</code> 的请求。</li><li><code>Plan_from_cache</code>:表示这个语句是否命中了执行计划缓存。</li><li><code>Plan_from_binding</code>:表示这个语句是否用的绑定的执行计划。</li><li><code>Has_more_results</code>:表示这个语句的查询结果是否还有更多的数据待用户发起 <code>fetch</code> 命令获取。</li><li><code>Rewrite_time</code>:表示这个语句在查询改写阶段花费的时间。</li><li><code>Preproc_subqueries</code>:表示这个语句中被提前执行的子查询个数,如 <code>where id in (select if from t)</code> 这个子查询就可能被提前执行。</li><li><code>Preproc_subqueries_time</code>:表示这个语句中被提前执行的子查询耗时。</li><li><code>Exec_retry_count</code>:表示这个语句执行的重试次数。一般出现在悲观事务中,上锁失败时重试执行该语句。</li><li><code>Exec_retry_time</code>:表示这个语句的重试执行时间。例如某个查询一共执行了三次(前两次失败),则 <code>Exec_retry_time</code> 表示前两次的执行时间之和,<code>Query_time</code> 减去 <code>Exec_retry_time</code> 则为最后一次执行时间。</li><li><code>KV_total</code>:表示这个语句在 TiKV/TiFlash 上所有 RPC 请求花费的时间。</li><li><code>PD_total</code>:表示这个语句在 PD 上所有 RPC 请求花费的时间。</li><li><code>Backoff_total</code>:表示这个语句在执行过程中所有 backoff 花费的时间。</li><li><code>Write_sql_response_total</code>:表示这个语句把结果发送回客户端花费的时间。</li><li><code>Result_rows</code>:表示这个语句查询结果的行数。</li><li><code>Warnings</code>:表示这个语句执行过程中产生的警告,采用 JSON 格式。通常和 <a href="/zh/tidb/stable/sql-statement-show-warnings"><code>SHOW WARNINGS</code></a> 语句的输出结果一致,但是可能会包含 <a href="/zh/tidb/stable/sql-statement-show-warnings"><code>SHOW WARNINGS</code></a> 中没有的警告,因而可以提供更多诊断信息。这类警告将被标记为 <code>IsExtra: true</code>。</li><li><code>IsExplicitTxn</code>:表示这个语句是否在一个明确声明的事务中。如果是 <code>false</code>,表示这个语句的事务是 <code>autocommit=1</code>,即语句执行完成后就自动提交的事务。</li></ul><p>和事务执行相关的字段:</p><ul><li><code>Prewrite_time</code>:表示事务两阶段提交中第一阶段(prewrite 阶段)的耗时。</li><li><code>Commit_time</code>:表示事务两阶段提交中第二阶段(commit 阶段)的耗时。</li><li><code>Get_commit_ts_time</code>:表示事务两阶段提交中第二阶段(commit 阶段)获取 commit 时间戳的耗时。</li><li><code>Local_latch_wait_time</code>:表示事务两阶段提交中第二阶段(commit 阶段)发起前在 TiDB 侧等锁的耗时。</li><li><code>Write_keys</code>:表示该事务向 TiKV 的 Write CF 写入 Key 的数量。</li><li><code>Write_size</code>:表示事务提交时写 key 或 value 的总大小。</li><li><code>Prewrite_region</code>:表示事务两阶段提交中第一阶段(prewrite 阶段)涉及的 TiKV Region 数量。每个 Region 会触发一次远程过程调用。</li><li><code>Wait_prewrite_binlog_time</code>:表示事务提交时用于写 binlog 的时间。</li><li><code>Resolve_lock_time</code>:表示事务提交时遇到锁后,清理锁或者等待锁过期的时间。</li></ul><p>和内存使用相关的字段:</p><ul><li><code>Mem_max</code>:表示执行期间 TiDB 使用的最大内存空间,单位为 byte。</li></ul><p>和硬盘使用相关的字段:</p><ul><li><code>Disk_max</code>:表示执行期间 TiDB 使用的最大硬盘空间,单位为 byte。</li></ul><p>和 SQL 执行的用户相关的字段:</p><ul><li><code>User</code>:表示执行语句的用户名。</li><li><code>Host</code>:表示执行语句的用户地址。</li><li><code>Conn_ID</code>:表示用户的链接 ID,可以用类似 <code>con:3</code> 的关键字在 TiDB 日志中查找该链接相关的其他日志。</li><li><code>DB</code>:表示执行语句时使用的 database。</li></ul><p>和 TiKV Coprocessor Task 相关的字段:</p><ul><li><code>Request_count</code>:表示这个语句发送的 Coprocessor 请求的数量。</li><li><code>Total_keys</code>:表示 Coprocessor 扫过的 key 的数量。</li><li><code>Process_time</code>:执行 SQL 在 TiKV 的处理时间之和,因为数据会并行的发到 TiKV 执行,这个值可能会超过 <code>Query_time</code>。</li><li><code>Wait_time</code>:表示这个语句在 TiKV 的等待时间之和,因为 TiKV 的 Coprocessor 线程数是有限的,当所有的 Coprocessor 线程都在工作的时候,请求会排队;当队列中有某些请求耗时很长的时候,后面的请求的等待时间都会增加。</li><li><code>Process_keys</code>:表示 Coprocessor 处理的 key 的数量。相比 total_keys,processed_keys 不包含 MVCC 的旧版本。如果 processed_keys 和 total_keys 相差很大,说明旧版本比较多。</li><li><code>Num_cop_tasks</code>:表示这个语句发送的 Coprocessor 请求的数量。</li><li><code>Cop_proc_avg</code>:cop-task 的平均执行时间,包括一些无法统计的等待时间,如 RocksDB 内的 mutex。</li><li><code>Cop_proc_p90</code>:cop-task 的 P90 分位执行时间。</li><li><code>Cop_proc_max</code>:cop-task 的最大执行时间。</li><li><code>Cop_proc_addr</code>:执行时间最长的 cop-task 所在地址。</li><li><code>Cop_wait_avg</code>:cop-task 的平均等待时间,包括请求排队和获取 snapshot 时间。</li><li><code>Cop_wait_p90</code>:cop-task 的 P90 分位等待时间。</li><li><code>Cop_wait_max</code>:cop-task 的最大等待时间。</li><li><code>Cop_wait_addr</code>:等待时间最长的 cop-task 所在地址。</li><li><code>Rocksdb_delete_skipped_count</code>:RocksDB 读数据过程中已删除 Key 的扫描数。</li><li><code>Rocksdb_key_skipped_count</code>:RocksDB 扫数据时遇到的已删除 (tombstone) Key 数量。</li><li><code>Rocksdb_block_cache_hit_count</code>:RocksDB 从 Block Cache 缓存中读数据的次数。</li><li><code>Rocksdb_block_read_count</code>:RocksDB 从文件系统中读数据的次数。</li><li><code>Rocksdb_block_read_byte</code>:RocksDB 从文件系统中读数据的数据量。</li><li><code>Rocksdb_block_read_time</code>:RocksDB 从文件系统中读数据的时间。</li><li><code>Cop_backoff_{backoff-type}_total_times</code>:因某种错误造成的 backoff 总次数。</li><li><code>Cop_backoff_{backoff-type}_total_time</code>:因某种错误造成的 backoff 总时间。</li><li><code>Cop_backoff_{backoff-type}_max_time</code>:因某种错误造成的最大 backoff 时间。</li><li><code>Cop_backoff_{backoff-type}_max_addr</code>:因某种错误造成的最大 backoff 时间的 cop-task 地址。</li><li><code>Cop_backoff_{backoff-type}_avg_time</code>:因某种错误造成的平均 backoff 时间。</li><li><code>Cop_backoff_{backoff-type}_p90_time</code>:因某种错误造成的 P90 分位 backoff 时间。</li></ul><p><code>backoff-type</code> 一般有以下几种:</p><ul><li><code>tikvRPC</code>:给 TiKV 发送 RPC 请求失败而产生的 backoff。</li><li><code>tiflashRPC</code>:给 TiFlash 发送 RPC 请求失败而产生的 backoff。</li><li><code>pdRPC</code>:给 PD 发送 RPC 请求失败而产生的 backoff。</li><li><code>txnLock</code>:遇到锁冲突后产生的 backoff。</li><li><code>regionMiss</code>:Region 发生分裂或者合并后,TiDB 的 Region 缓存信息过期导致请求失败而产生的 backoff。</li><li><code>regionScheduling</code>:Region 还在调度中,尚未选出 Leader 导致无法处理请求而产生的 backoff。</li><li><code>tikvServerBusy</code>:因为 TiKV 负载太高无法处理新请求而产生的 backoff。</li><li><code>tiflashServerBusy</code>:因为 TiFlash 负载太高无法处理新请求而产生的 backoff。</li><li><code>tikvDiskFull</code>:因为 TiKV 的磁盘满了而产生的 backoff。</li><li><code>txnLockFast</code>:因为读数据时遇到了锁而产生的 backoff。</li></ul><p>和资源管控相关的字段:</p><ul><li><code>Resource_group</code>:语句执行所绑定的资源组。</li><li><code>Request_unit_read</code>:执行语句消耗的总读 RU。</li><li><code>Request_unit_write</code>:执行语句消耗的总写 RU。</li><li><code>Time_queued_by_rc</code>:执行语句过程中等待可用资源的总耗时。</li></ul><h2 id="相关系统变量" style="position:relative"><a href="#%E7%9B%B8%E5%85%B3%E7%B3%BB%E7%BB%9F%E5%8F%98%E9%87%8F" aria-label="相关系统变量 permalink" class="anchor before"><svg aria-hidden="true" focusable="false" height="16" version="1.1" viewbox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"/></svg></a>相关系统变量</h2><ul><li><a href="/zh/tidb/stable/system-variables#tidb_slow_log_threshold">tidb_slow_log_threshold</a>:设置慢日志的阈值,执行时间超过阈值的 SQL 语句将被记录到慢日志中。默认值是 300 ms。</li><li><a href="/zh/tidb/stable/system-variables#tidb_query_log_max_len">tidb_query_log_max_len</a>:设置慢日志记录 SQL 语句的最大长度。默认值是 4096 byte。</li><li><a href="/zh/tidb/stable/system-variables#tidb_redact_log">tidb_redact_log</a>:设置慢日志记录 SQL 时是否将用户数据脱敏用 <code>?</code> 代替。默认值是 <code>0</code>,即关闭该功能。</li><li><a href="/zh/tidb/stable/system-variables#tidb_enable_collect_execution_info">tidb_enable_collect_execution_info</a>:设置是否记录执行计划中各个算子的物理执行信息,默认值是 <code>1</code>。该功能对性能的影响约为 3%。开启该项后查看 <code>Plan</code> 的示例如下:</li></ul><pre><code class="hljs language-sql"><div class="MuiBox-root css-1qhimia"><span class="hljs-operator">></span> <span class="hljs-keyword">select</span> tidb_decode_plan(<span class="hljs-string">'jAOIMAk1XzE3CTAJMQlmdW5jczpjb3VudChDb2x1bW4jNyktPkMJC/BMNQkxCXRpbWU6MTAuOTMxNTA1bXMsIGxvb3BzOjIJMzcyIEJ5dGVzCU4vQQoxCTMyXzE4CTAJMQlpbmRleDpTdHJlYW1BZ2dfOQkxCXQRSAwyNzY4LkgALCwgcnBjIG51bTogMQkMEXMQODg0MzUFK0hwcm9jIGtleXM6MjUwMDcJMjA2HXsIMgk1BWM2zwAAMRnIADcVyAAxHcEQNQlOL0EBBPBbCjMJMTNfMTYJMQkzMTI4MS44NTc4MTk5MDUyMTcJdGFibGU6dCwgaW5kZXg6aWR4KGEpLCByYW5nZTpbLWluZiw1MDAwMCksIGtlZXAgb3JkZXI6ZmFsc2UJMjUBrgnQVnsA'</span>); <span class="hljs-operator">+</span><span class="hljs-comment">------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+</span> <span class="hljs-operator">|</span> tidb_decode_plan(<span class="hljs-string">'jAOIMAk1XzE3CTAJMQlmdW5jczpjb3VudChDb2x1bW4jNyktPkMJC/BMNQkxCXRpbWU6MTAuOTMxNTA1bXMsIGxvb3BzOjIJMzcyIEJ5dGVzCU4vQQoxCTMyXzE4CTAJMQlpbmRleDpTdHJlYW1BZ2dfOQkxCXQRSAwyNzY4LkgALCwgcnBjIG51bTogMQkMEXMQODg0MzUFK0hwcm9jIGtleXM6MjUwMDcJMjA2HXsIMg | +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | id task estRows operator info actRows execution info memory disk | | StreamAgg_17 root 1 funcs:count(Column#7)->Column#5 1 time:10.931505ms, loops:2 372 Bytes N/A | | └─IndexReader_18 root 1 index:StreamAgg_9 1 time:10.927685ms, loops:2, rpc num: 1, rpc time:10.884355ms, proc keys:25007 206 Bytes N/A | | └─StreamAgg_9 cop 1 funcs:count(1)->Column#7 1 time:11ms, loops:25 N/A N/A | | └─IndexScan_16 cop 31281.857819905217 table:t, index:idx(a), range:[-inf,50000), keep order:false 25007 time:11ms, loops:25 N/A N/A | +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ </span></div><button class="MuiButtonBase-root MuiIconButton-root MuiIconButton-sizeSmall css-1rmx1rm" tabindex="0" type="button" aria-label="Toggle code wrap"><svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeInherit css-1cw4hi4" focusable="false" aria-hidden="true" viewbox="0 0 24 24" data-testid="WrapTextIcon"><path d="M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3 3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"/></svg></button><button class="MuiButtonBase-root MuiIconButton-root MuiIconButton-sizeSmall css-fxo539" tabindex="0" type="button" aria-label="copy"><svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeInherit css-1cw4hi4" focusable="false" aria-hidden="true" viewbox="0 0 24 24" data-testid="ContentCopyIcon"><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"/></svg></button></code></pre><p>在性能测试中可以关闭自动收集算子的执行信息:</p><pre><code class="hljs language-sql"><div class="MuiBox-root css-1qhimia"><span class="hljs-keyword">set</span> @<span class="hljs-variable">@tidb</span>_enable_collect_execution_info<span class="hljs-operator">=</span><span class="hljs-number">0</span>; </div><button class="MuiButtonBase-root MuiIconButton-root MuiIconButton-sizeSmall css-1rmx1rm" tabindex="0" type="button" aria-label="Toggle code wrap"><svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeInherit css-1cw4hi4" focusable="false" aria-hidden="true" viewbox="0 0 24 24" data-testid="WrapTextIcon"><path d="M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3 3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"/></svg></button><button class="MuiButtonBase-root MuiIconButton-root MuiIconButton-sizeSmall css-fxo539" tabindex="0" type="button" aria-label="copy"><svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeInherit css-1cw4hi4" focusable="false" aria-hidden="true" viewbox="0 0 24 24" data-testid="ContentCopyIcon"><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"/></svg></button></code></pre><p><code>Plan</code> 字段显示的格式和 <a href="/zh/tidb/stable/sql-statement-explain"><code>EXPLAIN</code></a> 或者 <a href="/zh/tidb/stable/sql-statement-explain-analyze"><code>EXPLAIN ANALYZE</code></a> 大致一致。可以查看 <a href="/zh/tidb/stable/sql-statement-explain"><code>EXPLAIN</code></a> 或者 <a href="/zh/tidb/stable/sql-statement-explain-analyze"><code>EXPLAIN ANALYZE</code></a> 文档了解更多关于执行计划的信息。</p><p>更多详细信息,可以参见 <a href="/zh/tidb/stable/system-variables">TiDB 专用系统变量和语法</a>。</p><h2 id="慢日志内存映射表" style="position:relative"><a href="#%E6%85%A2%E6%97%A5%E5%BF%97%E5%86%85%E5%AD%98%E6%98%A0%E5%B0%84%E8%A1%A8" aria-label="慢日志内存映射表 permalink" class="anchor before"><svg aria-hidden="true" focusable="false" height="16" version="1.1" viewbox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"/></svg></a>慢日志内存映射表</h2><p>用户可通过查询 <code>INFORMATION_SCHEMA.SLOW_QUERY</code> 表来查询慢查询日志中的内容,表中列名和慢日志中字段名一一对应,表结构可查看 <a href="/zh/tidb/stable/information-schema-slow-query"><code>SLOW_QUERY</code> 表</a>中的介绍。</p><div class="MuiBox-root css-1weqspv"><div class="MuiPaper-root MuiPaper-elevation MuiPaper-rounded MuiPaper-elevation0 MuiAlert-root MuiAlert-standardInfo MuiAlert-standard css-152gid5" role="alert"><div class="MuiAlert-icon css-1l54tgj"><svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeInherit css-1cw4hi4" focusable="false" aria-hidden="true" viewbox="0 0 24 24" data-testid="InfoOutlinedIcon"><path d="M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20, 12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10, 10 0 0,0 12,2M11,17H13V11H11V17Z"/></svg></div><div class="MuiAlert-message css-1xsto0d"><div class="MuiTypography-root MuiTypography-body1 MuiTypography-gutterBottom MuiAlertTitle-root css-17ioyuk">注意</div><p>每次查询 <code>SLOW_QUERY</code> 表时,TiDB 都会去读取和解析一次当前的慢查询日志。</p></div></div></div><p>TiDB 4.0 中,<code>SLOW_QUERY</code> 已经支持查询任意时间段的慢日志,即支持查询已经被 rotate 的慢日志文件的数据。用户查询时只需要指定 <code>TIME</code> 时间范围即可定位需要解析的慢日志文件。如果查询不指定时间范围,则仍然只解析当前的慢日志文件,示例如下:</p><p>不指定时间范围时,只会解析当前 TiDB 正在写入的慢日志文件的慢查询数据:</p><pre><code class="hljs language-sql"><div class="MuiBox-root css-1qhimia"><span class="hljs-keyword">select</span> <span class="hljs-built_in">count</span>(<span class="hljs-operator">*</span>), <span class="hljs-built_in">min</span>(<span class="hljs-type">time</span>), <span class="hljs-built_in">max</span>(<span class="hljs-type">time</span>) <span class="hljs-keyword">from</span> slow_query; </div><button class="MuiButtonBase-root MuiIconButton-root MuiIconButton-sizeSmall css-1rmx1rm" tabindex="0" type="button" aria-label="Toggle code wrap"><svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeInherit css-1cw4hi4" focusable="false" aria-hidden="true" viewbox="0 0 24 24" data-testid="WrapTextIcon"><path d="M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3 3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"/></svg></button><button class="MuiButtonBase-root MuiIconButton-root MuiIconButton-sizeSmall css-fxo539" tabindex="0" type="button" aria-label="copy"><svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeInherit css-1cw4hi4" focusable="false" aria-hidden="true" viewbox="0 0 24 24" data-testid="ContentCopyIcon"><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"/></svg></button></code></pre><pre><code class="hljs language-"><div class="MuiBox-root css-1qhimia">+----------+----------------------------+----------------------------+ | count(*) | min(time) | max(time) | +----------+----------------------------+----------------------------+ | 122492 | 2020-03-11 23:35:20.908574 | 2020-03-25 19:16:38.229035 | +----------+----------------------------+----------------------------+ </div><button class="MuiButtonBase-root MuiIconButton-root MuiIconButton-sizeSmall css-1rmx1rm" tabindex="0" type="button" aria-label="Toggle code wrap"><svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeInherit css-1cw4hi4" focusable="false" aria-hidden="true" viewbox="0 0 24 24" data-testid="WrapTextIcon"><path d="M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3 3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"/></svg></button><button class="MuiButtonBase-root MuiIconButton-root MuiIconButton-sizeSmall css-fxo539" tabindex="0" type="button" aria-label="copy"><svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeInherit css-1cw4hi4" focusable="false" aria-hidden="true" viewbox="0 0 24 24" data-testid="ContentCopyIcon"><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"/></svg></button></code></pre><p>指定查询 <code>2020-03-10 00:00:00</code> 到 <code>2020-03-11 00:00:00</code> 时间范围后,会定位指定时间范围内的慢日志文件后解析慢查询数据:</p><pre><code class="hljs language-sql"><div class="MuiBox-root css-1qhimia"><span class="hljs-keyword">select</span> <span class="hljs-built_in">count</span>(<span class="hljs-operator">*</span>), <span class="hljs-built_in">min</span>(<span class="hljs-type">time</span>), <span class="hljs-built_in">max</span>(<span class="hljs-type">time</span>) <span class="hljs-keyword">from</span> slow_query <span class="hljs-keyword">where</span> <span class="hljs-type">time</span> <span class="hljs-operator">></span> <span class="hljs-string">'2020-03-10 00:00:00'</span> <span class="hljs-keyword">and</span> <span class="hljs-type">time</span> <span class="hljs-operator"><</span> <span class="hljs-string">'2020-03-11 00:00:00'</span>; </div><button class="MuiButtonBase-root MuiIconButton-root MuiIconButton-sizeSmall css-1rmx1rm" tabindex="0" type="button" aria-label="Toggle code wrap"><svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeInherit css-1cw4hi4" focusable="false" aria-hidden="true" viewbox="0 0 24 24" data-testid="WrapTextIcon"><path d="M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3 3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"/></svg></button><button class="MuiButtonBase-root MuiIconButton-root MuiIconButton-sizeSmall css-fxo539" tabindex="0" type="button" aria-label="copy"><svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeInherit css-1cw4hi4" focusable="false" aria-hidden="true" viewbox="0 0 24 24" data-testid="ContentCopyIcon"><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"/></svg></button></code></pre><pre><code class="hljs language-"><div class="MuiBox-root css-1qhimia">+----------+----------------------------+----------------------------+ | count(*) | min(time) | max(time) | +----------+----------------------------+----------------------------+ | 2618049 | 2020-03-10 00:00:00.427138 | 2020-03-10 23:00:22.716728 | +----------+----------------------------+----------------------------+ </div><button class="MuiButtonBase-root MuiIconButton-root MuiIconButton-sizeSmall css-1rmx1rm" tabindex="0" type="button" aria-label="Toggle code wrap"><svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeInherit css-1cw4hi4" focusable="false" aria-hidden="true" viewbox="0 0 24 24" data-testid="WrapTextIcon"><path d="M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3 3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"/></svg></button><button class="MuiButtonBase-root MuiIconButton-root MuiIconButton-sizeSmall css-fxo539" tabindex="0" type="button" aria-label="copy"><svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeInherit css-1cw4hi4" focusable="false" aria-hidden="true" viewbox="0 0 24 24" data-testid="ContentCopyIcon"><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"/></svg></button></code></pre><div class="MuiBox-root css-1weqspv"><div class="MuiPaper-root MuiPaper-elevation MuiPaper-rounded MuiPaper-elevation0 MuiAlert-root MuiAlert-standardInfo MuiAlert-standard css-152gid5" role="alert"><div class="MuiAlert-icon css-1l54tgj"><svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeInherit css-1cw4hi4" focusable="false" aria-hidden="true" viewbox="0 0 24 24" data-testid="InfoOutlinedIcon"><path d="M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20, 12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10, 10 0 0,0 12,2M11,17H13V11H11V17Z"/></svg></div><div class="MuiAlert-message css-1xsto0d"><div class="MuiTypography-root MuiTypography-body1 MuiTypography-gutterBottom MuiAlertTitle-root css-17ioyuk">注意</div><p>如果指定时间范围内的慢日志文件被删除,或者并没有慢查询,则查询结果会返回空。</p></div></div></div><p>TiDB 4.0 中新增了 <a href="/zh/tidb/stable/information-schema-slow-query#cluster_slow_query-table"><code>CLUSTER_SLOW_QUERY</code></a> 系统表,用来查询所有 TiDB 节点的慢查询信息,表结构在 <code>SLOW_QUERY</code> 的基础上多增加了 <code>INSTANCE</code> 列,表示该行慢查询信息来自的 TiDB 节点地址。使用方式和 <a href="/zh/tidb/stable/information-schema-slow-query"><code>SLOW_QUERY</code></a> 系统表一样。</p><p>关于查询 <code>CLUSTER_SLOW_QUERY</code> 表,TiDB 会把相关的计算和判断下推到其他节点执行,而不是把其他节点的慢查询数据都取回来在一台 TiDB 上执行。</p><h2 id="查询-slow_querycluster_slow_query-示例" style="position:relative"><a href="#%E6%9F%A5%E8%AF%A2-slow_querycluster_slow_query-%E7%A4%BA%E4%BE%8B" aria-label="查询 slow_querycluster_slow_query 示例 permalink" class="anchor before"><svg aria-hidden="true" focusable="false" height="16" version="1.1" viewbox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"/></svg></a>查询 <code>SLOW_QUERY</code>/<code>CLUSTER_SLOW_QUERY</code> 示例</h2><h3 id="搜索-top-n-的慢查询" style="position:relative"><a href="#%E6%90%9C%E7%B4%A2-top-n-%E7%9A%84%E6%85%A2%E6%9F%A5%E8%AF%A2" aria-label="搜索 top n 的慢查询 permalink" class="anchor before"><svg aria-hidden="true" focusable="false" height="16" version="1.1" viewbox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"/></svg></a>搜索 Top N 的慢查询</h3><p>查询 Top 2 的用户慢查询。<code>is_internal=false</code> 表示排除 TiDB 内部的慢查询,只看用户的慢查询:</p><pre><code class="hljs language-sql"><div class="MuiBox-root css-1qhimia"><span class="hljs-keyword">select</span> query_time, query <span class="hljs-keyword">from</span> information_schema.slow_query <span class="hljs-keyword">where</span> is_internal <span class="hljs-operator">=</span> <span class="hljs-literal">false</span> <span class="hljs-comment">-- 排除 TiDB 内部的慢查询 SQL</span> <span class="hljs-keyword">order</span> <span class="hljs-keyword">by</span> query_time <span class="hljs-keyword">desc</span> limit <span class="hljs-number">2</span>; </div><button class="MuiButtonBase-root MuiIconButton-root MuiIconButton-sizeSmall css-1rmx1rm" tabindex="0" type="button" aria-label="Toggle code wrap"><svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeInherit css-1cw4hi4" focusable="false" aria-hidden="true" viewbox="0 0 24 24" data-testid="WrapTextIcon"><path d="M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3 3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"/></svg></button><button class="MuiButtonBase-root MuiIconButton-root MuiIconButton-sizeSmall css-fxo539" tabindex="0" type="button" aria-label="copy"><svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeInherit css-1cw4hi4" focusable="false" aria-hidden="true" viewbox="0 0 24 24" data-testid="ContentCopyIcon"><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"/></svg></button></code></pre><p>输出样例:</p><pre><code class="hljs language-"><div class="MuiBox-root css-1qhimia">+--------------+------------------------------------------------------------------+ | query_time | query | +--------------+------------------------------------------------------------------+ | 12.77583857 | select * from t_slim, t_wide where t_slim.c0=t_wide.c0; | | 0.734982725 | select t0.c0, t1.c1 from t_slim t0, t_wide t1 where t0.c0=t1.c0; | +--------------+------------------------------------------------------------------+ </div><button class="MuiButtonBase-root MuiIconButton-root MuiIconButton-sizeSmall css-1rmx1rm" tabindex="0" type="button" aria-label="Toggle code wrap"><svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeInherit css-1cw4hi4" focusable="false" aria-hidden="true" viewbox="0 0 24 24" data-testid="WrapTextIcon"><path d="M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3 3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"/></svg></button><button class="MuiButtonBase-root MuiIconButton-root MuiIconButton-sizeSmall css-fxo539" tabindex="0" type="button" aria-label="copy"><svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeInherit css-1cw4hi4" focusable="false" aria-hidden="true" viewbox="0 0 24 24" data-testid="ContentCopyIcon"><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"/></svg></button></code></pre><h3 id="搜索某个用户的-top-n-慢查询" style="position:relative"><a href="#%E6%90%9C%E7%B4%A2%E6%9F%90%E4%B8%AA%E7%94%A8%E6%88%B7%E7%9A%84-top-n-%E6%85%A2%E6%9F%A5%E8%AF%A2" aria-label="搜索某个用户的 top n 慢查询 permalink" class="anchor before"><svg aria-hidden="true" focusable="false" height="16" version="1.1" viewbox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"/></svg></a>搜索某个用户的 Top N 慢查询</h3><p>下面例子中搜索 test 用户执行的慢查询 SQL,且按执行消耗时间逆序排序显式前 2 条:</p><pre><code class="hljs language-sql"><div class="MuiBox-root css-1qhimia"><span class="hljs-keyword">select</span> query_time, query, <span class="hljs-keyword">user</span> <span class="hljs-keyword">from</span> information_schema.slow_query <span class="hljs-keyword">where</span> is_internal <span class="hljs-operator">=</span> <span class="hljs-literal">false</span> <span class="hljs-comment">-- 排除 TiDB 内部的慢查询 SQL</span> <span class="hljs-keyword">and</span> <span class="hljs-keyword">user</span> <span class="hljs-operator">=</span> "test" <span class="hljs-comment">-- 查找的用户名</span> <span class="hljs-keyword">order</span> <span class="hljs-keyword">by</span> query_time <span class="hljs-keyword">desc</span> limit <span class="hljs-number">2</span>; </div><button class="MuiButtonBase-root MuiIconButton-root MuiIconButton-sizeSmall css-1rmx1rm" tabindex="0" type="button" aria-label="Toggle code wrap"><svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeInherit css-1cw4hi4" focusable="false" aria-hidden="true" viewbox="0 0 24 24" data-testid="WrapTextIcon"><path d="M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3 3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"/></svg></button><button class="MuiButtonBase-root MuiIconButton-root MuiIconButton-sizeSmall css-fxo539" tabindex="0" type="button" aria-label="copy"><svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeInherit css-1cw4hi4" focusable="false" aria-hidden="true" viewbox="0 0 24 24" data-testid="ContentCopyIcon"><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"/></svg></button></code></pre><p>输出样例:</p><pre><code class="hljs language-"><div class="MuiBox-root css-1qhimia">+-------------+------------------------------------------------------------------+----------------+ | Query_time | query | user | +-------------+------------------------------------------------------------------+----------------+ | 0.676408014 | select t0.c0, t1.c1 from t_slim t0, t_wide t1 where t0.c0=t1.c1; | test | +-------------+------------------------------------------------------------------+----------------+ </div><button class="MuiButtonBase-root MuiIconButton-root MuiIconButton-sizeSmall css-1rmx1rm" tabindex="0" type="button" aria-label="Toggle code wrap"><svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeInherit css-1cw4hi4" focusable="false" aria-hidden="true" viewbox="0 0 24 24" data-testid="WrapTextIcon"><path d="M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3 3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"/></svg></button><button class="MuiButtonBase-root MuiIconButton-root MuiIconButton-sizeSmall css-fxo539" tabindex="0" type="button" aria-label="copy"><svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeInherit css-1cw4hi4" focusable="false" aria-hidden="true" viewbox="0 0 24 24" data-testid="ContentCopyIcon"><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"/></svg></button></code></pre><h3 id="根据-sql-指纹搜索同类慢查询" style="position:relative"><a href="#%E6%A0%B9%E6%8D%AE-sql-%E6%8C%87%E7%BA%B9%E6%90%9C%E7%B4%A2%E5%90%8C%E7%B1%BB%E6%85%A2%E6%9F%A5%E8%AF%A2" aria-label="根据 sql 指纹搜索同类慢查询 permalink" class="anchor before"><svg aria-hidden="true" focusable="false" height="16" version="1.1" viewbox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"/></svg></a>根据 SQL 指纹搜索同类慢查询</h3><p>在得到 Top N 的慢查询 SQL 后,可通过 SQL 指纹继续搜索同类慢查询 SQL。</p><p>先获取 Top N 的慢查询和对应的 SQL 指纹:</p><pre><code class="hljs language-sql"><div class="MuiBox-root css-1qhimia"><span class="hljs-keyword">select</span> query_time, query, digest <span class="hljs-keyword">from</span> information_schema.slow_query <span class="hljs-keyword">where</span> is_internal <span class="hljs-operator">=</span> <span class="hljs-literal">false</span> <span class="hljs-keyword">order</span> <span class="hljs-keyword">by</span> query_time <span class="hljs-keyword">desc</span> limit <span class="hljs-number">1</span>; </div><button class="MuiButtonBase-root MuiIconButton-root MuiIconButton-sizeSmall css-1rmx1rm" tabindex="0" type="button" aria-label="Toggle code wrap"><svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeInherit css-1cw4hi4" focusable="false" aria-hidden="true" viewbox="0 0 24 24" data-testid="WrapTextIcon"><path d="M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3 3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"/></svg></button><button class="MuiButtonBase-root MuiIconButton-root MuiIconButton-sizeSmall css-fxo539" tabindex="0" type="button" aria-label="copy"><svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeInherit css-1cw4hi4" focusable="false" aria-hidden="true" viewbox="0 0 24 24" data-testid="ContentCopyIcon"><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"/></svg></button></code></pre><p>输出样例:</p><pre><code class="hljs language-"><div class="MuiBox-root css-1qhimia">+-------------+-----------------------------+------------------------------------------------------------------+ | query_time | query | digest | +-------------+-----------------------------+------------------------------------------------------------------+ | 0.302558006 | select * from t1 where a=1; | 4751cb6008fda383e22dacb601fde85425dc8f8cf669338d55d944bafb46a6fa | +-------------+-----------------------------+------------------------------------------------------------------+ </div><button class="MuiButtonBase-root MuiIconButton-root MuiIconButton-sizeSmall css-1rmx1rm" tabindex="0" type="button" aria-label="Toggle code wrap"><svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeInherit css-1cw4hi4" focusable="false" aria-hidden="true" viewbox="0 0 24 24" data-testid="WrapTextIcon"><path d="M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3 3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"/></svg></button><button class="MuiButtonBase-root MuiIconButton-root MuiIconButton-sizeSmall css-fxo539" tabindex="0" type="button" aria-label="copy"><svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeInherit css-1cw4hi4" focusable="false" aria-hidden="true" viewbox="0 0 24 24" data-testid="ContentCopyIcon"><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"/></svg></button></code></pre><p>再根据 SQL 指纹搜索同类慢查询:</p><pre><code class="hljs language-sql"><div class="MuiBox-root css-1qhimia"><span class="hljs-keyword">select</span> query, query_time <span class="hljs-keyword">from</span> information_schema.slow_query <span class="hljs-keyword">where</span> digest <span class="hljs-operator">=</span> "4751cb6008fda383e22dacb601fde85425dc8f8cf669338d55d944bafb46a6fa"; </div><button class="MuiButtonBase-root MuiIconButton-root MuiIconButton-sizeSmall css-1rmx1rm" tabindex="0" type="button" aria-label="Toggle code wrap"><svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeInherit css-1cw4hi4" focusable="false" aria-hidden="true" viewbox="0 0 24 24" data-testid="WrapTextIcon"><path d="M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3 3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"/></svg></button><button class="MuiButtonBase-root MuiIconButton-root MuiIconButton-sizeSmall css-fxo539" tabindex="0" type="button" aria-label="copy"><svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeInherit css-1cw4hi4" focusable="false" aria-hidden="true" viewbox="0 0 24 24" data-testid="ContentCopyIcon"><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"/></svg></button></code></pre><p>输出样例:</p><pre><code class="hljs language-"><div class="MuiBox-root css-1qhimia">+-----------------------------+-------------+ | query | query_time | +-----------------------------+-------------+ | select * from t1 where a=1; | 0.302558006 | | select * from t1 where a=2; | 0.401313532 | +-----------------------------+-------------+ </div><button class="MuiButtonBase-root MuiIconButton-root MuiIconButton-sizeSmall css-1rmx1rm" tabindex="0" type="button" aria-label="Toggle code wrap"><svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeInherit css-1cw4hi4" focusable="false" aria-hidden="true" viewbox="0 0 24 24" data-testid="WrapTextIcon"><path d="M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3 3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"/></svg></button><button class="MuiButtonBase-root MuiIconButton-root MuiIconButton-sizeSmall css-fxo539" tabindex="0" type="button" aria-label="copy"><svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeInherit css-1cw4hi4" focusable="false" aria-hidden="true" viewbox="0 0 24 24" data-testid="ContentCopyIcon"><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"/></svg></button></code></pre><h3 id="搜索统计信息为-pseudo-的慢查询-sql-语句" style="position:relative"><a href="#%E6%90%9C%E7%B4%A2%E7%BB%9F%E8%AE%A1%E4%BF%A1%E6%81%AF%E4%B8%BA-pseudo-%E7%9A%84%E6%85%A2%E6%9F%A5%E8%AF%A2-sql-%E8%AF%AD%E5%8F%A5" aria-label="搜索统计信息为 pseudo 的慢查询 sql 语句 permalink" class="anchor before"><svg aria-hidden="true" focusable="false" height="16" version="1.1" viewbox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"/></svg></a>搜索统计信息为 pseudo 的慢查询 SQL 语句</h3><pre><code class="hljs language-sql"><div class="MuiBox-root css-1qhimia"><span class="hljs-keyword">select</span> query, query_time, stats <span class="hljs-keyword">from</span> information_schema.slow_query <span class="hljs-keyword">where</span> is_internal <span class="hljs-operator">=</span> <span class="hljs-literal">false</span> <span class="hljs-keyword">and</span> stats <span class="hljs-keyword">like</span> <span class="hljs-string">'%pseudo%'</span>; </div><button class="MuiButtonBase-root MuiIconButton-root MuiIconButton-sizeSmall css-1rmx1rm" tabindex="0" type="button" aria-label="Toggle code wrap"><svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeInherit css-1cw4hi4" focusable="false" aria-hidden="true" viewbox="0 0 24 24" data-testid="WrapTextIcon"><path d="M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3 3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"/></svg></button><button class="MuiButtonBase-root MuiIconButton-root MuiIconButton-sizeSmall css-fxo539" tabindex="0" type="button" aria-label="copy"><svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeInherit css-1cw4hi4" focusable="false" aria-hidden="true" viewbox="0 0 24 24" data-testid="ContentCopyIcon"><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"/></svg></button></code></pre><p>输出样例:</p><pre><code class="hljs language-"><div class="MuiBox-root css-1qhimia">+-----------------------------+-------------+---------------------------------+ | query | query_time | stats | +-----------------------------+-------------+---------------------------------+ | select * from t1 where a=1; | 0.302558006 | t1:pseudo | | select * from t1 where a=2; | 0.401313532 | t1:pseudo | | select * from t1 where a>2; | 0.602011247 | t1:pseudo | | select * from t1 where a>3; | 0.50077719 | t1:pseudo | | select * from t1 join t2; | 0.931260518 | t1:407872303825682445,t2:pseudo | +-----------------------------+-------------+---------------------------------+ </div><button class="MuiButtonBase-root MuiIconButton-root MuiIconButton-sizeSmall css-1rmx1rm" tabindex="0" type="button" aria-label="Toggle code wrap"><svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeInherit css-1cw4hi4" focusable="false" aria-hidden="true" viewbox="0 0 24 24" data-testid="WrapTextIcon"><path d="M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3 3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"/></svg></button><button class="MuiButtonBase-root MuiIconButton-root MuiIconButton-sizeSmall css-fxo539" tabindex="0" type="button" aria-label="copy"><svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeInherit css-1cw4hi4" focusable="false" aria-hidden="true" viewbox="0 0 24 24" data-testid="ContentCopyIcon"><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"/></svg></button></code></pre><h3 id="查询执行计划发生变化的慢查询" style="position:relative"><a href="#%E6%9F%A5%E8%AF%A2%E6%89%A7%E8%A1%8C%E8%AE%A1%E5%88%92%E5%8F%91%E7%94%9F%E5%8F%98%E5%8C%96%E7%9A%84%E6%85%A2%E6%9F%A5%E8%AF%A2" aria-label="查询执行计划发生变化的慢查询 permalink" class="anchor before"><svg aria-hidden="true" focusable="false" height="16" version="1.1" viewbox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"/></svg></a>查询执行计划发生变化的慢查询</h3><p>由于统计信息过时,或者统计信息因为误差无法精确反映数据的真实分布情况时,可能导致同类型 SQL 的执行计划发生改变导致执行变慢,可以用以下 SQL 查询哪些 SQL 具有不同的执行计划:</p><pre><code class="hljs language-sql"><div class="MuiBox-root css-1qhimia"><span class="hljs-keyword">select</span> <span class="hljs-built_in">count</span>(<span class="hljs-keyword">distinct</span> plan_digest) <span class="hljs-keyword">as</span> count, digest, <span class="hljs-built_in">min</span>(query) <span class="hljs-keyword">from</span> cluster_slow_query <span class="hljs-keyword">group</span> <span class="hljs-keyword">by</span> digest <span class="hljs-keyword">having</span> count <span class="hljs-operator">></span> <span class="hljs-number">1</span> limit <span class="hljs-number">3</span>\G </div><button class="MuiButtonBase-root MuiIconButton-root MuiIconButton-sizeSmall css-1rmx1rm" tabindex="0" type="button" aria-label="Toggle code wrap"><svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeInherit css-1cw4hi4" focusable="false" aria-hidden="true" viewbox="0 0 24 24" data-testid="WrapTextIcon"><path d="M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3 3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"/></svg></button><button class="MuiButtonBase-root MuiIconButton-root MuiIconButton-sizeSmall css-fxo539" tabindex="0" type="button" aria-label="copy"><svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeInherit css-1cw4hi4" focusable="false" aria-hidden="true" viewbox="0 0 24 24" data-testid="ContentCopyIcon"><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"/></svg></button></code></pre><p>输出样例:</p><pre><code class="hljs language-"><div class="MuiBox-root css-1qhimia">***************************[ 1. row ]*************************** count | 2 digest | 17b4518fde82e32021877878bec2bb309619d384fca944106fcaf9c93b536e94 min(query) | SELECT DISTINCT c FROM sbtest25 WHERE id BETWEEN ? AND ? ORDER BY c [arguments: (291638, 291737)]; ***************************[ 2. row ]*************************** count | 2 digest | 9337865f3e2ee71c1c2e740e773b6dd85f23ad00f8fa1f11a795e62e15fc9b23 min(query) | SELECT DISTINCT c FROM sbtest22 WHERE id BETWEEN ? AND ? ORDER BY c [arguments: (215420, 215519)]; ***************************[ 3. row ]*************************** count | 2 digest | db705c89ca2dfc1d39d10e0f30f285cbbadec7e24da4f15af461b148d8ffb020 min(query) | SELECT DISTINCT c FROM sbtest11 WHERE id BETWEEN ? AND ? ORDER BY c [arguments: (303359, 303458)]; </div><button class="MuiButtonBase-root MuiIconButton-root MuiIconButton-sizeSmall css-1rmx1rm" tabindex="0" type="button" aria-label="Toggle code wrap"><svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeInherit css-1cw4hi4" focusable="false" aria-hidden="true" viewbox="0 0 24 24" data-testid="WrapTextIcon"><path d="M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3 3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"/></svg></button><button class="MuiButtonBase-root MuiIconButton-root MuiIconButton-sizeSmall css-fxo539" tabindex="0" type="button" aria-label="copy"><svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeInherit css-1cw4hi4" focusable="false" aria-hidden="true" viewbox="0 0 24 24" data-testid="ContentCopyIcon"><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"/></svg></button></code></pre><p>然后可以用查询结果中的 SQL 指纹进一步查询不同的 plan</p><pre><code class="hljs language-sql"><div class="MuiBox-root css-1qhimia"><span class="hljs-keyword">select</span> <span class="hljs-built_in">min</span>(plan), plan_digest <span class="hljs-keyword">from</span> cluster_slow_query <span class="hljs-keyword">where</span> digest<span class="hljs-operator">=</span><span class="hljs-string">'17b4518fde82e32021877878bec2bb309619d384fca944106fcaf9c93b536e94'</span> <span class="hljs-keyword">group</span> <span class="hljs-keyword">by</span> plan_digest\G </div><button class="MuiButtonBase-root MuiIconButton-root MuiIconButton-sizeSmall css-1rmx1rm" tabindex="0" type="button" aria-label="Toggle code wrap"><svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeInherit css-1cw4hi4" focusable="false" aria-hidden="true" viewbox="0 0 24 24" data-testid="WrapTextIcon"><path d="M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3 3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"/></svg></button><button class="MuiButtonBase-root MuiIconButton-root MuiIconButton-sizeSmall css-fxo539" tabindex="0" type="button" aria-label="copy"><svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeInherit css-1cw4hi4" focusable="false" aria-hidden="true" viewbox="0 0 24 24" data-testid="ContentCopyIcon"><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"/></svg></button></code></pre><p>输出样例:</p><pre><code class="hljs language-"><div class="MuiBox-root css-1qhimia">*************************** 1. row *************************** min(plan): Sort_6 root 100.00131380758702 sbtest.sbtest25.c:asc └─HashAgg_10 root 100.00131380758702 group by:sbtest.sbtest25.c, funcs:firstrow(sbtest.sbtest25.c)->sbtest.sbtest25.c └─TableReader_15 root 100.00131380758702 data:TableRangeScan_14 └─TableScan_14 cop 100.00131380758702 table:sbtest25, range:[502791,502890], keep order:false plan_digest: 6afbbd21f60ca6c6fdf3d3cd94f7c7a49dd93c00fcf8774646da492e50e204ee *************************** 2. row *************************** min(plan): Sort_6 root 1 sbtest.sbtest25.c:asc └─HashAgg_12 root 1 group by:sbtest.sbtest25.c, funcs:firstrow(sbtest.sbtest25.c)->sbtest.sbtest25.c └─TableReader_13 root 1 data:HashAgg_8 └─HashAgg_8 cop 1 group by:sbtest.sbtest25.c, └─TableScan_11 cop 1.2440069558121831 table:sbtest25, range:[472745,472844], keep order:false </div><button class="MuiButtonBase-root MuiIconButton-root MuiIconButton-sizeSmall css-1rmx1rm" tabindex="0" type="button" aria-label="Toggle code wrap"><svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeInherit css-1cw4hi4" focusable="false" aria-hidden="true" viewbox="0 0 24 24" data-testid="WrapTextIcon"><path d="M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3 3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"/></svg></button><button class="MuiButtonBase-root MuiIconButton-root MuiIconButton-sizeSmall css-fxo539" tabindex="0" type="button" aria-label="copy"><svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeInherit css-1cw4hi4" focusable="false" aria-hidden="true" viewbox="0 0 24 24" data-testid="ContentCopyIcon"><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"/></svg></button></code></pre><h3 id="查询集群各个-tidb-节点的慢查询数量" style="position:relative"><a href="#%E6%9F%A5%E8%AF%A2%E9%9B%86%E7%BE%A4%E5%90%84%E4%B8%AA-tidb-%E8%8A%82%E7%82%B9%E7%9A%84%E6%85%A2%E6%9F%A5%E8%AF%A2%E6%95%B0%E9%87%8F" aria-label="查询集群各个 tidb 节点的慢查询数量 permalink" class="anchor before"><svg aria-hidden="true" focusable="false" height="16" version="1.1" viewbox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"/></svg></a>查询集群各个 TIDB 节点的慢查询数量</h3><pre><code class="hljs language-sql"><div class="MuiBox-root css-1qhimia"><span class="hljs-keyword">select</span> instance, <span class="hljs-built_in">count</span>(<span class="hljs-operator">*</span>) <span class="hljs-keyword">from</span> information_schema.cluster_slow_query <span class="hljs-keyword">where</span> <span class="hljs-type">time</span> <span class="hljs-operator">>=</span> "2020-03-06 00:00:00" <span class="hljs-keyword">and</span> <span class="hljs-type">time</span> <span class="hljs-operator"><</span> now() <span class="hljs-keyword">group</span> <span class="hljs-keyword">by</span> instance; </div><button class="MuiButtonBase-root MuiIconButton-root MuiIconButton-sizeSmall css-1rmx1rm" tabindex="0" type="button" aria-label="Toggle code wrap"><svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeInherit css-1cw4hi4" focusable="false" aria-hidden="true" viewbox="0 0 24 24" data-testid="WrapTextIcon"><path d="M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3 3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"/></svg></button><button class="MuiButtonBase-root MuiIconButton-root MuiIconButton-sizeSmall css-fxo539" tabindex="0" type="button" aria-label="copy"><svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeInherit css-1cw4hi4" focusable="false" aria-hidden="true" viewbox="0 0 24 24" data-testid="ContentCopyIcon"><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"/></svg></button></code></pre><p>输出样例:</p><pre><code class="hljs language-"><div class="MuiBox-root css-1qhimia">+---------------+----------+ | instance | count(*) | +---------------+----------+ | 0.0.0.0:10081 | 124 | | 0.0.0.0:10080 | 119771 | +---------------+----------+ </div><button class="MuiButtonBase-root MuiIconButton-root MuiIconButton-sizeSmall css-1rmx1rm" tabindex="0" type="button" aria-label="Toggle code wrap"><svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeInherit css-1cw4hi4" focusable="false" aria-hidden="true" viewbox="0 0 24 24" data-testid="WrapTextIcon"><path d="M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3 3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"/></svg></button><button class="MuiButtonBase-root MuiIconButton-root MuiIconButton-sizeSmall css-fxo539" tabindex="0" type="button" aria-label="copy"><svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeInherit css-1cw4hi4" focusable="false" aria-hidden="true" viewbox="0 0 24 24" data-testid="ContentCopyIcon"><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"/></svg></button></code></pre><h3 id="查询仅出现在异常时间段的慢日志" style="position:relative"><a href="#%E6%9F%A5%E8%AF%A2%E4%BB%85%E5%87%BA%E7%8E%B0%E5%9C%A8%E5%BC%82%E5%B8%B8%E6%97%B6%E9%97%B4%E6%AE%B5%E7%9A%84%E6%85%A2%E6%97%A5%E5%BF%97" aria-label="查询仅出现在异常时间段的慢日志 permalink" class="anchor before"><svg aria-hidden="true" focusable="false" height="16" version="1.1" viewbox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"/></svg></a>查询仅出现在异常时间段的慢日志</h3><p>假如发现 <code>2020-03-10 13:24:00</code> ~ <code>2020-03-10 13:27:00</code> 的 QPS 降低或者延迟上升等问题,可能是由于突然出现大查询导致的,可以用下面 SQL 查询仅出现在异常时间段的慢日志,其中 <code>2020-03-10 13:20:00</code> ~ <code>2020-03-10 13:23:00</code> 为正常时间段。</p><pre><code class="hljs language-sql"><div class="MuiBox-root css-1qhimia"><span class="hljs-keyword">SELECT</span> <span class="hljs-operator">*</span> <span class="hljs-keyword">FROM</span> (<span class="hljs-keyword">SELECT</span> <span class="hljs-comment">/*+ AGG_TO_COP(), HASH_AGG() */</span> <span class="hljs-built_in">count</span>(<span class="hljs-operator">*</span>), <span class="hljs-built_in">min</span>(<span class="hljs-type">time</span>), <span class="hljs-built_in">sum</span>(query_time) <span class="hljs-keyword">AS</span> sum_query_time, <span class="hljs-built_in">sum</span>(Process_time) <span class="hljs-keyword">AS</span> sum_process_time, <span class="hljs-built_in">sum</span>(Wait_time) <span class="hljs-keyword">AS</span> sum_wait_time, <span class="hljs-built_in">sum</span>(Commit_time), <span class="hljs-built_in">sum</span>(Request_count), <span class="hljs-built_in">sum</span>(process_keys), <span class="hljs-built_in">sum</span>(Write_keys), <span class="hljs-built_in">max</span>(Cop_proc_max), <span class="hljs-built_in">min</span>(query),<span class="hljs-built_in">min</span>(prev_stmt), digest <span class="hljs-keyword">FROM</span> information_schema.CLUSTER_SLOW_QUERY <span class="hljs-keyword">WHERE</span> <span class="hljs-type">time</span> <span class="hljs-operator">>=</span> <span class="hljs-string">'2020-03-10 13:24:00'</span> <span class="hljs-keyword">AND</span> <span class="hljs-type">time</span> <span class="hljs-operator"><</span> <span class="hljs-string">'2020-03-10 13:27:00'</span> <span class="hljs-keyword">AND</span> Is_internal <span class="hljs-operator">=</span> <span class="hljs-literal">false</span> <span class="hljs-keyword">GROUP</span> <span class="hljs-keyword">BY</span> digest) <span class="hljs-keyword">AS</span> t1 <span class="hljs-keyword">WHERE</span> t1.digest <span class="hljs-keyword">NOT</span> <span class="hljs-keyword">IN</span> (<span class="hljs-keyword">SELECT</span> <span class="hljs-comment">/*+ AGG_TO_COP(), HASH_AGG() */</span> digest <span class="hljs-keyword">FROM</span> information_schema.CLUSTER_SLOW_QUERY <span class="hljs-keyword">WHERE</span> <span class="hljs-type">time</span> <span class="hljs-operator">>=</span> <span class="hljs-string">'2020-03-10 13:20:00'</span> <span class="hljs-keyword">AND</span> <span class="hljs-type">time</span> <span class="hljs-operator"><</span> <span class="hljs-string">'2020-03-10 13:23:00'</span> <span class="hljs-keyword">GROUP</span> <span class="hljs-keyword">BY</span> digest) <span class="hljs-keyword">ORDER</span> <span class="hljs-keyword">BY</span> t1.sum_query_time <span class="hljs-keyword">DESC</span> limit <span class="hljs-number">10</span>\G </div><button class="MuiButtonBase-root MuiIconButton-root MuiIconButton-sizeSmall css-1rmx1rm" tabindex="0" type="button" aria-label="Toggle code wrap"><svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeInherit css-1cw4hi4" focusable="false" aria-hidden="true" viewbox="0 0 24 24" data-testid="WrapTextIcon"><path d="M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3 3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"/></svg></button><button class="MuiButtonBase-root MuiIconButton-root MuiIconButton-sizeSmall css-fxo539" tabindex="0" type="button" aria-label="copy"><svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeInherit css-1cw4hi4" focusable="false" aria-hidden="true" viewbox="0 0 24 24" data-testid="ContentCopyIcon"><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"/></svg></button></code></pre><p>输出样例:</p><pre><code class="hljs language-"><div class="MuiBox-root css-1qhimia">***************************[ 1. row ]*************************** count(*) | 200 min(time) | 2020-03-10 13:24:27.216186 sum_query_time | 50.114126194 sum_process_time | 268.351 sum_wait_time | 8.476 sum(Commit_time) | 1.044304306 sum(Request_count) | 6077 sum(process_keys) | 202871950 sum(Write_keys) | 319500 max(Cop_proc_max) | 0.263 min(query) | delete from test.tcs2 limit 5000; min(prev_stmt) | digest | 24bd6d8a9b238086c9b8c3d240ad4ef32f79ce94cf5a468c0b8fe1eb5f8d03df </div><button class="MuiButtonBase-root MuiIconButton-root MuiIconButton-sizeSmall css-1rmx1rm" tabindex="0" type="button" aria-label="Toggle code wrap"><svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeInherit css-1cw4hi4" focusable="false" aria-hidden="true" viewbox="0 0 24 24" data-testid="WrapTextIcon"><path d="M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3 3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"/></svg></button><button class="MuiButtonBase-root MuiIconButton-root MuiIconButton-sizeSmall css-fxo539" tabindex="0" type="button" aria-label="copy"><svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeInherit css-1cw4hi4" focusable="false" aria-hidden="true" viewbox="0 0 24 24" data-testid="ContentCopyIcon"><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"/></svg></button></code></pre><h2 id="解析其他的-tidb-慢日志文件" style="position:relative"><a href="#%E8%A7%A3%E6%9E%90%E5%85%B6%E4%BB%96%E7%9A%84-tidb-%E6%85%A2%E6%97%A5%E5%BF%97%E6%96%87%E4%BB%B6" aria-label="解析其他的 tidb 慢日志文件 permalink" class="anchor before"><svg aria-hidden="true" focusable="false" height="16" version="1.1" viewbox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"/></svg></a>解析其他的 TiDB 慢日志文件</h2><p>TiDB 通过 session 变量 <code>tidb_slow_query_file</code> 控制查询 <code>INFORMATION_SCHEMA.SLOW_QUERY</code> 时要读取和解析的文件,可通过修改改 session 变量的值来查询其他慢查询日志文件的内容:</p><pre><code class="hljs language-sql"><div class="MuiBox-root css-1qhimia"><span class="hljs-keyword">set</span> tidb_slow_query_file <span class="hljs-operator">=</span> "/path-to-log/tidb-slow.log" </div><button class="MuiButtonBase-root MuiIconButton-root MuiIconButton-sizeSmall css-1rmx1rm" tabindex="0" type="button" aria-label="Toggle code wrap"><svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeInherit css-1cw4hi4" focusable="false" aria-hidden="true" viewbox="0 0 24 24" data-testid="WrapTextIcon"><path d="M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3 3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"/></svg></button><button class="MuiButtonBase-root MuiIconButton-root MuiIconButton-sizeSmall css-fxo539" tabindex="0" type="button" aria-label="copy"><svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeInherit css-1cw4hi4" focusable="false" aria-hidden="true" viewbox="0 0 24 24" data-testid="ContentCopyIcon"><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"/></svg></button></code></pre><h2 id="用-pt-query-digest-工具分析-tidb-慢日志" style="position:relative"><a href="#%E7%94%A8-pt-query-digest-%E5%B7%A5%E5%85%B7%E5%88%86%E6%9E%90-tidb-%E6%85%A2%E6%97%A5%E5%BF%97" aria-label="用 pt query digest 工具分析 tidb 慢日志 permalink" class="anchor before"><svg aria-hidden="true" focusable="false" height="16" version="1.1" viewbox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"/></svg></a>用 <code>pt-query-digest</code> 工具分析 TiDB 慢日志</h2><p>可以用 <code>pt-query-digest</code> 工具分析 TiDB 慢日志。</p><div class="MuiBox-root css-1weqspv"><div class="MuiPaper-root MuiPaper-elevation MuiPaper-rounded MuiPaper-elevation0 MuiAlert-root MuiAlert-standardInfo MuiAlert-standard css-152gid5" role="alert"><div class="MuiAlert-icon css-1l54tgj"><svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeInherit css-1cw4hi4" focusable="false" aria-hidden="true" viewbox="0 0 24 24" data-testid="InfoOutlinedIcon"><path d="M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20, 12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10, 10 0 0,0 12,2M11,17H13V11H11V17Z"/></svg></div><div class="MuiAlert-message css-1xsto0d"><div class="MuiTypography-root MuiTypography-body1 MuiTypography-gutterBottom MuiAlertTitle-root css-17ioyuk">注意</div><p>建议使用 pt-query-digest 3.0.13 及以上版本。</p></div></div></div><p>示例如下:</p><pre><code class="hljs language-sh"><div class="MuiBox-root css-1qhimia">pt-query-digest --report tidb-slow.log </div><button class="MuiButtonBase-root MuiIconButton-root MuiIconButton-sizeSmall css-1rmx1rm" tabindex="0" type="button" aria-label="Toggle code wrap"><svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeInherit css-1cw4hi4" focusable="false" aria-hidden="true" viewbox="0 0 24 24" data-testid="WrapTextIcon"><path d="M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3 3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"/></svg></button><button class="MuiButtonBase-root MuiIconButton-root MuiIconButton-sizeSmall css-fxo539" tabindex="0" type="button" aria-label="copy"><svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeInherit css-1cw4hi4" focusable="false" aria-hidden="true" viewbox="0 0 24 24" data-testid="ContentCopyIcon"><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"/></svg></button></code></pre><p>输出样例:</p><pre><code class="hljs language-"><div class="MuiBox-root css-1qhimia"># 320ms user time, 20ms system time, 27.00M rss, 221.32M vsz # Current date: Mon Mar 18 13:18:51 2019 # Hostname: localhost.localdomain # Files: tidb-slow.log # Overall: 1.02k total, 21 unique, 0 QPS, 0x concurrency _________________ # Time range: 2019-03-18-12:22:16 to 2019-03-18-13:08:52 # Attribute total min max avg 95% stddev median # ============ ======= ======= ======= ======= ======= ======= ======= # Exec time 218s 10ms 13s 213ms 30ms 1s 19ms # Query size 175.37k 9 2.01k 175.89 158.58 122.36 158.58 # Commit time 46ms 2ms 7ms 3ms 7ms 1ms 3ms # Conn ID 71 1 16 8.88 15.25 4.06 9.83 # Process keys 581.87k 2 103.15k 596.43 400.73 3.91k 400.73 # Process time 31s 1ms 10s 32ms 19ms 334ms 16ms # Request coun 1.97k 1 10 2.02 1.96 0.33 1.96 # Total keys 636.43k 2 103.16k 652.35 793.42 3.97k 400.73 # Txn start ts 374.38E 0 16.00E 375.48P 1.25P 89.05T 1.25P # Wait time 943ms 1ms 19ms 1ms 2ms 1ms 972us </div><button class="MuiButtonBase-root MuiIconButton-root MuiIconButton-sizeSmall css-1rmx1rm" tabindex="0" type="button" aria-label="Toggle code wrap"><svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeInherit css-1cw4hi4" focusable="false" aria-hidden="true" viewbox="0 0 24 24" data-testid="WrapTextIcon"><path d="M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3 3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"/></svg></button><button class="MuiButtonBase-root MuiIconButton-root MuiIconButton-sizeSmall css-fxo539" tabindex="0" type="button" aria-label="copy"><svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeInherit css-1cw4hi4" focusable="false" aria-hidden="true" viewbox="0 0 24 24" data-testid="ContentCopyIcon"><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"/></svg></button></code></pre><h3 id="定位问题语句的方法" style="position:relative"><a href="#%E5%AE%9A%E4%BD%8D%E9%97%AE%E9%A2%98%E8%AF%AD%E5%8F%A5%E7%9A%84%E6%96%B9%E6%B3%95" aria-label="定位问题语句的方法 permalink" class="anchor before"><svg aria-hidden="true" focusable="false" height="16" version="1.1" viewbox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"/></svg></a>定位问题语句的方法</h3><p>并不是所有 SLOW_QUERY 的语句都是有问题的。会造成集群整体压力增大的,是那些 process_time 很大的语句。wait_time 很大,但 process_time 很小的语句通常不是问题语句,是因为被问题语句阻塞,在执行队列等待造成的响应时间过长。</p><h2 id="admin-show-slow-命令" style="position:relative"><a href="#admin-show-slow-%E5%91%BD%E4%BB%A4" aria-label="admin show slow 命令 permalink" class="anchor before"><svg aria-hidden="true" focusable="false" height="16" version="1.1" viewbox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"/></svg></a><code>ADMIN SHOW SLOW</code> 命令</h2><p>除了获取 TiDB 日志,还有一种定位慢查询的方式是通过 <code>ADMIN SHOW SLOW</code> SQL 命令:</p><pre><code class="hljs language-sql"><div class="MuiBox-root css-1qhimia">ADMIN <span class="hljs-keyword">SHOW</span> SLOW recent N;
推荐文章
帅呆的紫菜汤
·
神经网络训练怎么多线程 - CSDN文库
2 月前
刚毅的皮带
·
GridView动态创建列、多行表头_mygridview 多行表头-CSDN博客
1 年前
潇洒的领结
·
手把手带你用Python完成一个能写进简历的项目(实战篇)_Python进阶者的博客-CSDN博客
1 年前
怕老婆的罐头
·
Can‘t use Subversion command line client:svn——无法使用Subversion命令行客户端:svn_芳草萋萋鹦鹉洲哦的博客-CSDN博客
1 年前
性感的绿豆
·
用户对问题“VBA将数据行转换为列。”的回答 - 问答 - 腾讯云开发者社区-腾讯云
1 年前