-
Enhancement
-
Resolution: Done
-
Major
-
0.9.0.Beta2
-
None
In streaming phase, a sys.fn_cdc_map_lsn_to_time() stored procedure is executed for each row. This might be a performance bottleneck.
io.debezium.connector.sqlserver.SqlServerStreamingChangeEventSource#offsetContext
offsetContext.setSourceTime(connection.timestampOfLsn(commitLsn));
- We can take advantage of the fact that the stored procedure is called for commitLsn, which, in general, can be the same for many rows. Even having a simple LRU cache which keeps a few entries we can significantly reduce the number of such queries.
- Updating sourceTime can be optional (via configuration).