1.在我的 mysql/bin 文件夾下並沒有 pt-query-digest.pl 文件,所以需要手動下載!首先安裝perl支持後,接下來在 mysql/bin 文件夾下打開 git bash窗口,輸入命令:
curl -o pt-query-digest.pl https://www.percona.com/get/pt-query-digest
進度變爲100%後即爲下載成功!
2.簡單使用:
perl pt-query-digest.pl --help//獲取使用幫助
perl pt-query-digest.pl ../data/mysql-slow.log //簡單查詢