In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-30 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly introduces how to use the pt-query-digest slow query analysis tool, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let the editor take you to understand it.
1. The installation process is omitted because a previous dba has installed pt-query-digest on the server
Mainly describe how to use it
1. Locate the installation directory
You can use find /-name pt-query-digest or find /-name pt-query
Find the path at / usr/bin
Then enter the slow query log directory
Cd / var/log/mysql
[root@hs-dba-1 mysql] # ll
Total 732888
-rw-r--r-- 1 root root 31621 Mar 20 11:14 digest.log
-rw-rw---- 1 mysql mysql 16909390 Mar 20 10:19 mysql_error.log
-rw-r- 1 mysql mysql 16384 Dec 12 09:37 mysql_error.log_bak
-rw-rw---- 1 mysql mysql 559719 Mar 20 13:37 slow-query.log
-rw-r- 1 mysql mysql 1457 Nov 2618: 20 slowquery.log_20162618
-rwxrwxrwx 1 mysql mysql 1 Mar 14 16:58 slowquery.log_bak
-rw-r- 1 mysql mysql 732930070 Jan 3 17:53 slowquery.log_bak_20170103
You can see the slow query log slow-query.log
Then use the command
/ usr/bin/pt-query-digest slow-query.log > digest.log
Generate digest.log files in the current directory
Thank you for reading this article carefully. I hope the article "how to use pt-query-digest slow query Analysis tool" shared by the editor will be helpful to everyone. At the same time, I also hope that you will support and pay attention to the industry information channel. More related knowledge is waiting for you to learn!
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.