mysql-sql tuning tools Performance Schema and Explain (v8.0.x)

preamble

In the process of writing sql queries, I often encounter slow queries, but I don’t know the reason. I often search for a long time on the Internet. Others’ problems seem to be similar to ours, but the same solution can be solved no matter what. We can’t solve our problem, so mysql provides us with two very good judgment tools for sql performance, which can allow us to quickly locate the reason for the slow query and help us solve the problem better. Without further ado, the feature film begins !

Performance Schema (performance schema)

Show-profile official website address: https://dev.mysql.com/doc/refman/8.0/en/show-profile.html
insert image description here
We enter the mysql official document to query show-profile, and we will see the above passage:

不推荐使用 SHOW PROFILE 和 SHOW PROFILES 语句;期望它们在未来的 MySQL 版本中被删除。改用性能模式;请参阅第 27.19.1 节,“使用性能模式进行查询分析”。

So if you plan to continue to use show-profile for performance analysis, please go to the official website to learn.


Preformance Schema official website address:

Guess you like

Origin blog.csdn.net/m0_56981185/article/details/126632569