release-22.2: opt: set default session settings and cache histograms in benchmarks#98309
Conversation
Setting the default session settings makes the micro-benchmarks more representative of real-world workloads. Epic: None Release note: None
Histograms and histogram types are now cached in the test catalog. This prevents computation and allocations made while building these histograms from dominating profiles in optimizer micro-benchmarks. Epic: None Release note: None
Epic: None Release note: None
|
Thanks for opening a backport. Please check the backport criteria before merging:
If some of the basic criteria cannot be satisfied, ensure that the exceptional criteria are satisfied within.
Add a brief release justification to the body of your PR to justify this backport. Some other things to consider:
|
|
I'm backporting this so that optimizer benchmarks don't show a huge regression between |
DrewKimball
left a comment
There was a problem hiding this comment.
Reviewed 2 of 2 files at r1, 1 of 1 files at r2, 1 of 1 files at r3, all commit messages.
Reviewable status:complete! 1 of 0 LGTMs obtained (waiting on @mgartner and @michae2)
pkg/sql/opt/bench/bench_test.go line 597 at r1 (raw file):
// Setup the default session settings. h.evalCtx.SessionData().ReorderJoinsLimit = opt.DefaultJoinOrderLimit
Probably doesn't matter, but this has the duplicate ReorderJoinsLimit
|
Previously, DrewKimball (Drew Kimball) wrote…
I'll fix this on master with #98310 but leave as-is here since it has no impact. |
Backport 3/4 commits from #93482.
Informs #98306.
/cc @cockroachdb/release
opt: set default session settings in micro-benchmarks
Setting the default session settings makes the micro-benchmarks more
representative of real-world workloads.
Epic: None
Release note: None
opt: cache histograms in test catalog
Histograms and histogram types are now cached in the test catalog. This
prevents computation and allocations made while building these
histograms from dominating profiles in optimizer micro-benchmarks.
Epic: None
Release note: None
opt: add benchmark for single-column table with histogram
Epic: None
Release note: None
Release justification: This is a test-only change. It prevents the optimizer
benchmarks from showing a huge regression between release-22.2 and
master because of the increase in the join re-ordering limit from 0 (i.e.,
join re-ordering disabled) to 8.