-
Notifications
You must be signed in to change notification settings - Fork 470
[optimizer] cache the previous hash in TransformCtx
#30868
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[optimizer] cache the previous hash in TransformCtx
#30868
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks!
Running locally, here's the overhead with the soft assert:
and without it (because I'm not sure whether or not the soft assert is enabled during these feature benchmarks; by the numbers, it seems to not be):
So there's definitely still a slowdown, but not quite as egregious as it was before. |
#30806 adds some metrics on transforms, but the work of hashing is non-trivial on very large queries. We can reduce hashing by half: store the previous hash in
TransformCtx
. (UsingTransformCtx
is @ggevay's idea; I was going to do something much more invasive.)This shows a ~3s speedup on the
InsertMultiRow
benchmark on my machine (8s -> 5s).Motivation
https://github.com/MaterializeInc/database-issues/issues/8832
Checklist
$T ⇔ Proto$T
mapping (possibly in a backwards-incompatible way), then it is tagged with aT-proto
label.