Skip to content

Instantly share code, notes, and snippets.

@tkuchiki
Created November 5, 2013 12:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tkuchiki/7318431 to your computer and use it in GitHub Desktop.
Save tkuchiki/7318431 to your computer and use it in GitHub Desktop.
mysqldumpslow
# 実行時間(time)
mysqldumpslow -s t /path/to/log
# 平均実行時間(average time)
mysqldumpslow -s at /path/to/log
# ロック時間(lock time)
mysqldumpslow -s l /path/to/log
# 平均ロック時間(average lock time)
mysqldumpslow -s al /path/to/log
# 行数(rows)
mysqldumpslow -s r /path/to/log
# 平均行数(average rows)
mysqldumpslow -s ar /path/to/log
# 実行回数が多い順(count)
mysqldumpslow -s c /path/to/log
# pattern の文字列が含まれる SQL(grep style pattern)
mysqldumpslow -g SELECT /path/to/log
# ソートを逆順にする
mysqldumpslow -r /path/to/log
# 上位10件
mysqldumpslow -t 10 /path/to/log
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment