-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
sql/catalog/resolver: remove an allocation, add a benchmark #72817
sql/catalog/resolver: remove an allocation, add a benchmark #72817
Conversation
We didn't need to allocate this name except on error paths. Make that lazy. The added benchmark also shows that we do horrifically badly when using user-defined schemas and `search_path`. Yay for benchmarks. ``` name old time/op new time/op delta ResolveExistingObject/CREATE_TABLE_foo_()foo-16 2.18µs ± 5% 2.03µs ± 2% -6.96% (p=0.008 n=5+5) ResolveExistingObject/CREATE_SCHEMA_sc;CREATE_TABLE_sc.foo_()sc.foo-16 1.59µs ± 4% 1.53µs ± 4% ~ (p=0.063 n=5+5) ResolveExistingObject/CREATE_SCHEMA_sc;CREATE_TABLE_sc.foo_()foo-16 60.5µs ± 4% 60.1µs ± 6% ~ (p=0.690 n=5+5) name old alloc/op new alloc/op delta ResolveExistingObject/CREATE_TABLE_foo_()foo-16 72.4B ± 1% 7.6B ±18% -89.50% (p=0.008 n=5+5) ResolveExistingObject/CREATE_SCHEMA_sc;CREATE_TABLE_sc.foo_()sc.foo-16 69.4B ± 1% 5.0B ± 0% -92.80% (p=0.008 n=5+5) ResolveExistingObject/CREATE_SCHEMA_sc;CREATE_TABLE_sc.foo_()foo-16 11.2kB ± 0% 11.1kB ± 0% -0.56% (p=0.008 n=5+5) name old allocs/op new allocs/op delta ResolveExistingObject/CREATE_TABLE_foo_()foo-16 1.00 ± 0% 0.00 -100.00% (p=0.008 n=5+5) ResolveExistingObject/CREATE_SCHEMA_sc;CREATE_TABLE_sc.foo_()sc.foo-16 1.00 ± 0% 0.00 -100.00% (p=0.008 n=5+5) ResolveExistingObject/CREATE_SCHEMA_sc;CREATE_TABLE_sc.foo_()foo-16 75.0 ± 0% 74.0 ± 0% -1.33% (p=0.008 n=5+5) ``` Release note: None
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.
Reviewed 3 of 4 files at r1, all commit messages.
Reviewable status: complete! 0 of 0 LGTMs obtained (waiting on @fqazi)
@fqazi was that an approval comment? |
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.
Yes, forgot to hit LGTM
Reviewable status: complete! 0 of 0 LGTMs obtained (waiting on @fqazi)
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.
Reviewable status: complete! 1 of 0 LGTMs obtained (waiting on @fqazi)
TFTR bors r+ |
Build failed (retrying...): |
Build succeeded: |
We didn't need to allocate this name except on error paths. Make that lazy.
The added benchmark also shows that we do horrifically badly when using
user-defined schemas and
search_path
. Yay for benchmarks.Release note: None