Last active
March 10, 2019 08:27
-
-
Save IkezoeMakoto/46ca9dcae2c77f981396cca350dd12ab to your computer and use it in GitHub Desktop.
スロークエリを見る
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 設定を確認 | |
`show variables like 'slow%';` | |
`show variables like 'long%';` | |
# 設定する | |
``` | |
set global slow_query_log_file = '/tmp/mysql-slow.log'; | |
set global long_query_time = 1; | |
set global slow_query_log = ON; | |
``` | |
# 確認する | |
`mysqldumpslow -s t /tmp/mysql-slow.log` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment