Skip to content

Performance improvements#9

Merged
rcarver merged 11 commits intomainfrom
perf
Mar 18, 2026
Merged

Performance improvements#9
rcarver merged 11 commits intomainfrom
perf

Conversation

@rcarver
Copy link
Contributor

@rcarver rcarver commented Mar 17, 2026

A set of performance improvemetns:

  • Updates store sparse data; only the modified columns
  • Batch replay by grouping insert, update, delete into repeatable queries with IN condition
  • Skip duplicate reconcilliation during replay

Internally, we store a simple tab-delimited format instead of real sql string. That makes it easier to parse and aggregate. This is all handled by a type UndoSQL on the table record.

Added a benchmark test. We can't compare to main, but can confirm that the batching mechanism pays off:

┌───────────┬──────┬───────────┬─────────┬─────────┐
│ Operation │ Rows │ Unbatched │ Batched │ Speedup │
├───────────┼──────┼───────────┼─────────┼─────────┤
│ INSERT    │ 2000 │ 123.5 ms  │ 35.2 ms │ 3.5x    │
├───────────┼──────┼───────────┼─────────┼─────────┤
│ UPDATE    │ 2000 │ 307.2 ms  │ 28.0 ms │ 11.0x   │
└───────────┴──────┴───────────┴─────────┴─────────┘

@rcarver rcarver merged commit 5ee00ca into main Mar 18, 2026
2 of 3 checks passed
@rcarver rcarver deleted the perf branch March 18, 2026 01:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant