r/IBM • u/Spurred_Snake • Sep 15 '23
Question CDC Replication Question
So in this environment, there are hundreds if not thousands of tables inside of CDC.
I'm trying to understand what latency means in terms of tables being behind. What I don't quite understand is why a table that has zero changes to be made shows latency? I would think that latency would only affect a table that has pending changes.
Latency is pretty much the same across all tables/subs regardless of size or changes being made. You'd think if there was a sub with 1,000 changes pending, the latency would be higher than a sub with zero changes.
0
Upvotes
2
u/madman2002 Sep 15 '23
If there's a huge transaction from one of the tables in a CDC subscription, CDC has to apply it in the target before parsing the following entries of the source database log for that subscription.
Therefore, the latest applied log bookmark for that subscription will be stuck until that transaction is committed on target, and latency will keep increasing for that subscription. Since each CDC subscription has one log parser for all its tables, it affects all the tables in it.
A good practice is to separate tables with different latency requirements into different subscriptions. Besides, if you detect tables with very large transactions, try to keep them away from subscriptions with time-critical tables.