可以看到,命令达到 1000 左右就进行分发了,此时查看订阅数据库,数据也同步过来了,这样就省去了较多扫描命令的时间。
更详细查看每个事务的命令数,如下:
SELECT top 10 A.xact_seqno,A.entry_time,COUNT(*) AS cmdsFROM distribution.dbo.MSrepl_transactions A(NOLOCK) INNER JOIN distribution.dbo.MSrepl_commands B(NOLOCK) ON A.xact_seqno=B.xact_seqnoGROUP BY A.xact_seqno,A.entry_timeORDER BY cmds DESC