Last active
January 9, 2021 20:28
-
-
Save lukavia/69206e519b96ff812437da5d51a5b423 to your computer and use it in GitHub Desktop.
Print statistic from mysql/mariadb binary logs by number of operations on tables. You can add additional filters from mysqlbinlog, like --start-datetime, --stop-datetime, etc
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
#!/bin/sh | |
mysqlbinlog --base64-output=decode-row --verbose "$@" \ | |
| grep '^###.*`.*`.`' \ | |
| sort \ | |
| uniq -c \ | |
| sort -nr |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment