MySQL之binlog事务大小排序

时间:2020-09-18 00:24:31   收藏:0   阅读:34
[root@api ~]# mysqlbinlog /data/mysql/binlog/mysql-bin.000005| grep "GTID$(printf ‘\t‘)last_committed" -B 1 | grep -E ‘^# at‘ | awk ‘{print $3}‘| awk ‘NR==1 {tmp=$1} NR>1 {print ($1-tmp);tmp=$1}‘| sort -n -r | head -n 10 626534 159015 93716 81881 73161 45825 43355 41071 38849 33351

这是这个 binlog 中最大的 10 个事务的大小,可以看到最大的事务在 binlog 中占用了 626kk 大小,不算太大。

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!