my2sql icon indicating copy to clipboard operation
my2sql copied to clipboard

没找到显示每条sql的执行时间参数

Open WhaleKids opened this issue 2 years ago • 1 comments

有时候需要对binlog进行分析,定位问题,想要知道语句插入数据库时候的时间,没在参数列表中找到类似参数选项 像binlog2sql 中每条sql后面都会有该事务的完成时间

WhaleKids avatar Oct 13 '23 01:10 WhaleKids

没有这个参数 base/events.go 第328行修改添加如下代码,重新build就可以了 //str := strings.Join(sq.sqls, ";\n") + ";\n" str := strings.Join(sq.sqls, "; #"+sq.sqlInfo.datetime+" \n") + "; #"+sq.sqlInfo.datetime+" \n"

nicexiaowen avatar Nov 20 '25 08:11 nicexiaowen