opt: fix regression in many-columns-and-indexes microbenchmark#72136
Merged
craig[bot] merged 1 commit intocockroachdb:masterfrom Oct 29, 2021
Merged
opt: fix regression in many-columns-and-indexes microbenchmark#72136craig[bot] merged 1 commit intocockroachdb:masterfrom
craig[bot] merged 1 commit intocockroachdb:masterfrom
Conversation
Member
rytaft
commented
Oct 29, 2021
Collaborator
Author
rytaft
left a comment
There was a problem hiding this comment.
benchmarks:
name old time/op new time/op delta
Phases/many-columns-and-indexes-b/Prepared/Explore-4 813µs ± 1% 416µs ± 1% -48.75% (p=0.016 n=5+4)
Phases/many-columns-and-indexes-b/Prepared/ExecBuild-4 833µs ± 6% 430µs ± 4% -48.44% (p=0.008 n=5+5)
Phases/many-columns-and-indexes-a/Simple/ExecBuild-4 869µs ± 5% 464µs ± 9% -46.63% (p=0.008 n=5+5)
Phases/many-columns-and-indexes-b/Simple/ExecBuild-4 917µs ± 4% 494µs ± 2% -46.15% (p=0.008 n=5+5)
Phases/many-columns-and-indexes-b/Simple/Explore-4 896µs ± 1% 487µs ± 3% -45.65% (p=0.008 n=5+5)
Phases/many-columns-and-indexes-a/Prepared/Explore-4 795µs ± 1% 433µs ±12% -45.55% (p=0.008 n=5+5)
Phases/many-columns-and-indexes-a/Prepared/ExecBuild-4 804µs ± 1% 442µs ±20% -45.08% (p=0.008 n=5+5)
Phases/many-columns-and-indexes-a/Simple/Explore-4 850µs ± 1% 480µs ±23% -43.55% (p=0.008 n=5+5)
Phases/many-columns-and-indexes-a/Simple/Parse-4 12.9µs ± 1% 13.1µs ± 5% ~ (p=0.310 n=5+5)
Phases/many-columns-and-indexes-a/Simple/OptBuildNoNorm-4 289µs ± 1% 300µs ± 5% ~ (p=0.056 n=5+5)
Phases/many-columns-and-indexes-a/Simple/OptBuildNorm-4 296µs ± 2% 298µs ± 1% ~ (p=0.730 n=5+4)
Phases/many-columns-and-indexes-a/Prepared/AssignPlaceholdersNoNorm-4 257µs ± 0% 272µs ±10% ~ (p=0.111 n=4+5)
Phases/many-columns-and-indexes-a/Prepared/AssignPlaceholdersNorm-4 259µs ± 1% 277µs ±19% ~ (p=0.222 n=5+5)
Phases/many-columns-and-indexes-b/Simple/Parse-4 23.5µs ± 2% 24.1µs ± 3% ~ (p=0.310 n=5+5)
Phases/many-columns-and-indexes-b/Simple/OptBuildNoNorm-4 319µs ± 2% 324µs ± 4% ~ (p=0.421 n=5+5)
Phases/many-columns-and-indexes-b/Simple/OptBuildNorm-4 334µs ± 1% 333µs ± 2% ~ (p=1.000 n=5+5)
Phases/many-columns-and-indexes-b/Prepared/AssignPlaceholdersNoNorm-4 269µs ± 3% 266µs ± 1% ~ (p=0.841 n=5+5)
Phases/many-columns-and-indexes-b/Prepared/AssignPlaceholdersNorm-4 264µs ± 0% 266µs ± 1% ~ (p=0.190 n=4+5)
name old alloc/op new alloc/op delta
Phases/many-columns-and-indexes-a/Prepared/Explore-4 159kB ± 0% 4kB ± 0% -97.26% (p=0.008 n=5+5)
Phases/many-columns-and-indexes-a/Prepared/ExecBuild-4 159kB ± 0% 5kB ± 0% -96.85% (p=0.008 n=5+5)
Phases/many-columns-and-indexes-b/Prepared/Explore-4 161kB ± 0% 6kB ± 0% -95.99% (p=0.008 n=5+5)
Phases/many-columns-and-indexes-b/Prepared/ExecBuild-4 162kB ± 0% 7kB ± 0% -95.39% (p=0.008 n=5+5)
Phases/many-columns-and-indexes-a/Simple/Explore-4 171kB ± 0% 17kB ± 0% -90.31% (p=0.008 n=5+5)
Phases/many-columns-and-indexes-a/Simple/ExecBuild-4 172kB ± 0% 17kB ± 0% -89.96% (p=0.008 n=5+5)
Phases/many-columns-and-indexes-b/Simple/Explore-4 178kB ± 0% 24kB ± 0% -86.76% (p=0.008 n=5+5)
Phases/many-columns-and-indexes-b/Simple/ExecBuild-4 179kB ± 0% 25kB ± 0% -86.27% (p=0.008 n=5+5)
Phases/many-columns-and-indexes-a/Simple/Parse-4 2.48kB ± 0% 2.48kB ± 0% ~ (all equal)
Phases/many-columns-and-indexes-a/Simple/OptBuildNoNorm-4 13.6kB ± 0% 13.6kB ± 0% ~ (all equal)
Phases/many-columns-and-indexes-a/Simple/OptBuildNorm-4 15.5kB ± 0% 15.5kB ± 0% ~ (all equal)
Phases/many-columns-and-indexes-a/Prepared/AssignPlaceholdersNoNorm-4 3.30kB ± 0% 3.30kB ± 0% ~ (all equal)
Phases/many-columns-and-indexes-a/Prepared/AssignPlaceholdersNorm-4 3.30kB ± 0% 3.30kB ± 0% ~ (all equal)
Phases/many-columns-and-indexes-b/Simple/Parse-4 3.71kB ± 0% 3.71kB ± 0% ~ (all equal)
Phases/many-columns-and-indexes-b/Simple/OptBuildNoNorm-4 19.5kB ± 0% 19.5kB ± 0% ~ (p=1.000 n=5+5)
Phases/many-columns-and-indexes-b/Simple/OptBuildNorm-4 22.5kB ± 0% 22.5kB ± 0% ~ (p=0.746 n=5+5)
Phases/many-columns-and-indexes-b/Prepared/AssignPlaceholdersNoNorm-4 5.40kB ± 0% 5.40kB ± 0% ~ (p=1.000 n=5+5)
Phases/many-columns-and-indexes-b/Prepared/AssignPlaceholdersNorm-4 5.40kB ± 0% 5.40kB ± 0% ~ (p=0.444 n=5+5)
name old allocs/op new allocs/op delta
Phases/many-columns-and-indexes-a/Prepared/Explore-4 277 ± 0% 23 ± 0% -91.70% (p=0.008 n=5+5)
Phases/many-columns-and-indexes-a/Prepared/ExecBuild-4 288 ± 0% 34 ± 0% -88.19% (p=0.008 n=5+5)
Phases/many-columns-and-indexes-b/Prepared/Explore-4 292 ± 0% 38 ± 0% -86.99% (p=0.008 n=5+5)
Phases/many-columns-and-indexes-b/Prepared/ExecBuild-4 307 ± 0% 53 ± 0% -82.74% (p=0.008 n=5+5)
Phases/many-columns-and-indexes-a/Simple/Explore-4 325 ± 0% 71 ± 0% -78.15% (p=0.008 n=5+5)
Phases/many-columns-and-indexes-a/Simple/ExecBuild-4 336 ± 0% 82 ± 0% -75.60% (p=0.008 n=5+5)
Phases/many-columns-and-indexes-b/Simple/Explore-4 384 ± 0% 130 ± 0% -66.15% (p=0.008 n=5+5)
Phases/many-columns-and-indexes-b/Simple/ExecBuild-4 399 ± 0% 145 ± 0% -63.66% (p=0.008 n=5+5)
Phases/many-columns-and-indexes-a/Simple/Parse-4 21.0 ± 0% 21.0 ± 0% ~ (all equal)
Phases/many-columns-and-indexes-a/Simple/OptBuildNoNorm-4 62.0 ± 0% 62.0 ± 0% ~ (all equal)
Phases/many-columns-and-indexes-a/Simple/OptBuildNorm-4 69.0 ± 0% 69.0 ± 0% ~ (all equal)
Phases/many-columns-and-indexes-a/Prepared/AssignPlaceholdersNoNorm-4 21.0 ± 0% 21.0 ± 0% ~ (all equal)
Phases/many-columns-and-indexes-a/Prepared/AssignPlaceholdersNorm-4 21.0 ± 0% 21.0 ± 0% ~ (all equal)
Phases/many-columns-and-indexes-b/Simple/Parse-4 30.0 ± 0% 30.0 ± 0% ~ (all equal)
Phases/many-columns-and-indexes-b/Simple/OptBuildNoNorm-4 109 ± 0% 109 ± 0% ~ (all equal)
Phases/many-columns-and-indexes-b/Simple/OptBuildNorm-4 128 ± 0% 128 ± 0% ~ (all equal)
Phases/many-columns-and-indexes-b/Prepared/AssignPlaceholdersNoNorm-4 36.0 ± 0% 36.0 ± 0% ~ (all equal)
Phases/many-columns-and-indexes-b/Prepared/AssignPlaceholdersNorm-4 36.0 ± 0% 36.0 ± 0% ~ (all equal)
Reviewable status:
complete! 0 of 0 LGTMs obtained (waiting on @cucaroach and @mgartner)
cucaroach
reviewed
Oct 29, 2021
Contributor
There was a problem hiding this comment.
Nice! I figured there had to be a way to just completely avoid all this work.
Reviewable status:
complete! 1 of 0 LGTMs obtained (waiting on @mgartner)
cucaroach
approved these changes
Oct 29, 2021
Contributor
cucaroach
left a comment
There was a problem hiding this comment.
Reviewable status:
complete! 1 of 0 LGTMs obtained (waiting on @mgartner)
This commit fixes a regression that was due to unnecessary computation of interesting orderings. We now only compute interesting orderings when it may be beneficial for planning purposes. Fixes cockroachdb#72001 Release note (performance improvement): Fixed a performance regression in planning that could occur for simple queries on schemas with a large number of indexes.
135ae8b to
b8b3e37
Compare
Collaborator
Author
|
TFTR! bors r+ |
Contributor
|
Build failed: |
rytaft
commented
Oct 29, 2021
Collaborator
Author
rytaft
left a comment
There was a problem hiding this comment.
Brilliant.
Definitely a team effort!
bors r+
Reviewable status:
complete! 0 of 0 LGTMs obtained (and 1 stale)
Contributor
|
Build succeeded: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This commit fixes a regression that was due to unnecessary computation
of interesting orderings. We now only compute interesting orderings
when it may be beneficial for planning purposes.
Fixes #72001
Release note (performance improvement): Fixed a performance regression
in planning that could occur for simple queries on schemas with a large
number of indexes.