当前位置:Gxlcms > 数据库问题 > MySQL之binlog事务大小排序

MySQL之binlog事务大小排序

时间:2021-07-01 10:21:17 帮助过:29人阅读

[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 大小,不算太大。

MySQL之binlog事务大小排序

标签:grep   ted   strong   mysql-bin   log   str   排序   sort   mit   

人气教程排行