当前位置:网站首页>mysql 的show profiles 使用。
mysql 的show profiles 使用。
2022-07-29 05:20:00 【麻辣隔壁4】
为了分析sql的执行耗时以及性能。我们可以使用show profiles 进行分析。
首先查看是否开启:
show VARIABLES like "profiling"如果开启它的值会是ON.如果没有开启则使用下面语句开启。
set profiling='on'查询最近语句的执行情况:
SHOW PROFILES执行的结果为:

可以看到query_id为127的执行用了1.12秒。那么是什么导致它执行慢可以用以下语句进行查询
SHOW PROFILE cpu,block io for query 127执行的结果为:

可以看到这条语句在执行的时候耗费了大量的时间。 因为数据库有50万条数据。然后对他进行排序。
边栏推荐
- Read and understand move2earn project - move
- The completely decentralized programming mode does not need servers or IP, just like a aimless network extending everywhere
- Common prompt pop-up box of uniapp
- 获取水仙花数
- 30 knowledge points that must be mastered in quantitative development [what is individual data]?
- Super simple integration of HMS ml kit to realize parent control
- C# 连接 SharepointOnline WebService
- Madonna "hellent" bought $1.3 million NFT boring ape, which is now considered too expensive
- rsync+inotyfy实现数据单项监控实时同步
- H5 semantic label
猜你喜欢

From starfish OS' continued deflationary consumption of SFO, the value of SFO in the long run

我的理想工作,码农的绝对自由支配才是最重要的——未来创业的追求

超简单集成HMS ML Kit 实现parental control

XDFS&中国日报社在线协同编辑平台典型案例

Idea using JDBC to connect mysql database personal detailed tutorial

『全闪实测』数据库加速解决方案

MOVE PROTOCOL全球健康宣言,将健康运动进行到底

Machine learning makes character recognition easier: kotlin+mvvm+ Huawei ml Kit

Intelligent security of the fifth space ⼤ real competition problem ----------- PNG diagram ⽚ converter

并发编程学习笔记 之 ReentrantLock实现原理的探究
随机推荐
Laravel swagger add access password
Fantom (FTM) surged 45% before the FOMC meeting
Differences between href and SRC
How does PHP generate QR code?
学习、研究编程之道
July 28 ens/usd Value Forecast: ENS attracts huge profits
如何在加密市场熊市中生存?
熊市慢慢,Bit.Store提供稳定Staking产品助你穿越牛熊
Study and research the way of programming
Plato Farm有望通过Elephant Swap,进一步向外拓展生态
Training log 6 of the project "construction of Shandong University mobile Internet development technology teaching website"
30 knowledge points that must be mastered in quantitative development [what is level-2 data]
File文件上传的使用(2)--上传到阿里云Oss文件服务器
深度学习的趣味app简单优化(适合新手)
“山东大学移动互联网开发技术教学网站建设”项目实训日志二
Bare metal cloud FASS high performance elastic block storage solution
马斯克推崇的柏拉图式元宇宙,PlatoFarm早已验证出答案
Process management of day02 operation
Under the bear market of encrypted assets, platofarm's strategy can still obtain stable income
rsync+inotyfy实现数据单项监控实时同步