Sumeta — the company behind Bridge
Engineering

Log-based CDC vs polling: a reproducible benchmark (PostgreSQL → Snowflake)

Most CDC comparisons argue about technique. This one is a method: what to measure, how to measure it, and which results are valid. Run it on your own data before you believe either vendor.

Engineering · 2026-11-03 · Sumeta engineering

The two designs differ in where cost lands. Polling pays in repeated table scans whose cost scales with table size; log-based capture pays in log retention and log-read I/O, whose cost scales with change volume.

40–60s
P95 capture lag, typical log-based deployment
120 MB/s
Single-node throughput, 8-core / 32 GB
280k rows/s
High-scale capture in a production deployment
Read-only
No triggers, shadow tables or scans

Method

Publish the parameters or the numbers mean nothing.
ParameterSettingWhy it matters
SourcePostgreSQL with wal_level=logicalLogical decoding is required for log-based capture
TargetSnowflake warehouse, fixed sizeRemoving warehouse elasticity isolates capture cost
DatasetOne wide table plus one high-churn narrow tableSeparates scan cost from change cost
LoadSteady inserts and updates for 6 hoursAvoids burst effects that mask steady-state cost
InstrumentationSource CPU, I/O, query latency; capture lagMeasures impact, not just throughput

The two designs should be run against the same dataset and the same target, with the same transformation. Changing more than one variable makes the comparison an anecdote.

What to measure

Metrics that separate the designs; measure all five.
MetricPollingLog-basedInterpretation
Source CPU during syncSpikes with table scansBroadly flat; log-read I/O onlyThe main operational difference
Source query latencyVisible during scansNo measurable change in typical deploymentsWhat your application team feels
Capture lag (P95)Bounded by interval40–60s typicalFreshness floor
Bytes read from sourceScales with table sizeScales with change volumeWhy the curves cross
Recovery after outageRe-scan or diffResume from offsetCost of a bad night

The result that matters is not "which is faster" in the abstract. It is where the two curves cross for your table sizes and change rates. A small, high-churn table favours log-based capture on impact; a large, low-churn table favours whichever design minimizes scans — and that is usually log-based too, which is the counter-intuitive part.

How to reproduce it

  1. Create a source table with a realistic row width and a primary key that reflects your access pattern.
  2. Enable logical decoding and confirm a replication slot can be created.
  3. Generate a steady change workload; record rows changed per second.
  4. Run polling at the interval you actually use, and log-based capture against the same target.
  5. Sample source CPU, I/O and query latency at one-second resolution for both runs.
  6. Force a 30-minute outage mid-run and measure recovery time and duplicate rows for each design.

Step six is the one most benchmarks omit, and the one that decides operational cost. A design that recovers by resuming an offset behaves very differently from one that must re-scan.

What invalidates a benchmark

  • Different targets. Warehouse size changes load latency more than capture design does.
  • Different transforms. A transformation tier hides the capture difference.
  • Burst-only load. Peaks hide steady-state scan cost.
  • No outage test. Recovery behaviour is where the designs diverge most.

Run the benchmark on your data

Download the build and repeat the six steps against a copy of your own source.