[{"data":1,"prerenderedAt":142},["ShallowReactive",2],{"content:\u002F2025\u002F09\u002Fmysql-performance-analyse":3,"surround:\u002F2025\u002F09\u002Fmysql-performance-analyse":133},{"id":4,"title":5,"body":6,"categories":110,"date":112,"description":113,"draft":114,"extension":115,"image":116,"meta":117,"navigation":60,"path":119,"permalink":116,"published":116,"readingTime":120,"recommend":116,"references":116,"seo":125,"sitemap":126,"stem":127,"tags":128,"type":131,"updated":112,"__hash__":132},"content\u002Fposts\u002F2025\u002F09\u002Fmysql-performance-analyse.md","MySQL 查询性能分析方法",{"type":7,"value":8,"toc":108},"minimark",[9,13,36,39,97,104],[10,11,12],"p",{},"查看数据库是否开启性能分析的开关",[14,15,20],"pre",{"className":16,"code":17,"language":18,"meta":19,"style":19},"language-sql shiki shiki-themes github-light github-dark","select @@have_profiling;\n","sql","",[21,22,23],"code",{"__ignoreMap":19},[24,25,28,32],"span",{"class":26,"data-line":27,"line":27},"line",1,[24,29,31],{"class":30},"szBVR","select",[24,33,35],{"class":34},"sVt8B"," @@have_profiling;\n",[10,37,38],{},"查看sql语句具体性能",[14,40,42],{"className":16,"code":41,"language":18,"meta":19,"style":19},"# 查看sql语句的耗时\nshow profiles;\n\nshow profile for query query_id;\n\nshow profile cpu for query query_id;\n",[21,43,44,49,55,62,77,82],{"__ignoreMap":19},[24,45,46],{"class":26,"data-line":27,"line":27},[24,47,48],{"class":34},"# 查看sql语句的耗时\n",[24,50,52],{"class":26,"data-line":51,"line":51},2,[24,53,54],{"class":34},"show profiles;\n",[24,56,58],{"class":26,"data-line":57,"line":57},3,[24,59,61],{"emptyLinePlaceholder":60},true,"\n",[24,63,65,68,71,74],{"class":26,"data-line":64,"line":64},4,[24,66,67],{"class":34},"show ",[24,69,70],{"class":30},"profile",[24,72,73],{"class":30}," for",[24,75,76],{"class":34}," query query_id;\n",[24,78,80],{"class":26,"data-line":79,"line":79},5,[24,81,61],{"emptyLinePlaceholder":60},[24,83,85,87,89,92,95],{"class":26,"data-line":84,"line":84},6,[24,86,67],{"class":34},[24,88,70],{"class":30},[24,90,91],{"class":34}," cpu ",[24,93,94],{"class":30},"for",[24,96,76],{"class":34},[10,98,99],{},[100,101],"img",{"alt":102,"src":103},"image-20250901225635397","https:\u002F\u002Fcdn.jsdelivr.net\u002Fgh\u002Fcodepzj\u002Fimages@main\u002F20250901225724857.png",[105,106,107],"style",{},"html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":19,"searchDepth":64,"depth":64,"links":109},[],[111],"数据库","2025-09-01","介绍 MySQL Profiling 等性能分析方法，帮助定位 SQL 执行耗时与查询过程中的性能瓶颈。",false,"md",null,{"slots":118},{},"\u002F2025\u002F09\u002Fmysql-performance-analyse",{"text":121,"minutes":122,"time":123,"words":124},"1 min read",0.24,14400,48,{"title":5,"description":113},{"loc":119},"posts\u002F2025\u002F09\u002Fmysql-performance-analyse",[129,130],"MySQL","性能优化","tech","MmiImymrQenPTL1SJaJkxmH8EEshLjX8ctU8zGTiPjA",[134,138],{"title":135,"path":136,"stem":137,"date":112,"type":131,"children":-1},"MySQL 索引基础与工作原理","\u002F2025\u002F09\u002Fmysql-index-description","posts\u002F2025\u002F09\u002Fmysql-index-description",{"title":139,"path":140,"stem":141,"date":112,"type":131,"children":-1},"不急于求成，才是最长远的成长","\u002F2025\u002F09\u002Fthe-courage-to-grow-slowly","posts\u002F2025\u002F09\u002Fthe-courage-to-grow-slowly",1786555055852]