Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Use the mysqldumpslow command of linux to display a summary of slow log files

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

Editor to share with you the use of linux mysqldumpslow command to display slow log file summary, I believe that most people do not know much, so share this article for you to learn, I hope you will learn a lot after reading this article, let's go to learn the method!

Use the mysqldumpslow command to parse the slow query log file and display a summary of its contents. The slow query log contains information that takes a long time to execute the query.

Syntax format: mysqldumpslow [parameters] [slow query log file]

Common parameters:

Reference example

Show slow log file / var/lib/mysql/slowquery.log summary:

[root@linuxcool ~] # mysqldumpslow / var/lib/mysql/slowquery.log

Get the top 10 SQL that returns the recordset:

[root@linuxcool] # mysqldumpslow-s r-t 10 / database/mysql/mysql06_slow.log

Get the 10 most visited SQL:

[root@linuxcool ~] # mysqldumpslow-s c-t 10 / database/mysql/mysql06_slow.log above are all the contents of the summary of slow log files displayed using linux's mysqldumpslow command. Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report