sql: add optimizer_use_improved_disjunction_stats session setting#94389
Conversation
DrewKimball
left a comment
There was a problem hiding this comment.
Is there a specific case we're hoping to improve with this or is it a general improvement?
Reviewed 8 of 8 files at r1, all commit messages.
Reviewable status:complete! 1 of 0 LGTMs obtained (waiting on @msirek)
msirek
left a comment
There was a problem hiding this comment.
I think InternalExecutor.execInternal doesn't always copy default session settings over, so may sometimes use a LocalOnlySessionData with all false and 0 values. To be sure the new code path isn't used for internal SQL execution in the backports you could invert optimizer_use_improved_disjunction_stats. Name it something like optimizer_disable_improved_disjunction_stats and make the default be false.
Reviewable status:
complete! 1 of 0 LGTMs obtained (waiting on @mgartner)
mgartner
left a comment
There was a problem hiding this comment.
@DrewKimball see https://github.com/cockroachlabs/support/issues/1971
@msirek A false value disables the new code path. I'm planning on changing the globalTrue to globalFalse in the backports. Will that not be sufficient to ensure that it's disabled?
Reviewable status:
complete! 1 of 0 LGTMs obtained (waiting on @mgartner)
msirek
left a comment
There was a problem hiding this comment.
Reviewable status:
complete! 2 of 0 LGTMs obtained (waiting on @mgartner)
5877e03 to
8c011e3
Compare
This commit adds the `optimizer_use_improved_disjunction_stats` session setting that defaults to `true`. When `true`, the improved disjunction logic added in cockroachdb#89358 is performed. When `false`, the logic reverts to the previous logic. This setting will allow use to backport the new logic without impacting query plans of running clusters by defaulting the setting to false. Release note: None
8c011e3 to
b1a2ce5
Compare
|
TFTRs! bors r+ |
|
Build succeeded: |
|
Encountered an error creating backports. Some common things that can go wrong:
You might need to create your backport manually using the backport tool. error creating merge commit from b1a2ce5 to blathers/backport-release-22.1-94389: POST https://api.github.com/repos/cockroachdb/cockroach/merges: 409 Merge conflict [] you may need to manually resolve merge conflicts with the backport tool. Backport to branch 22.1.x failed. See errors above. error creating merge commit from b1a2ce5 to blathers/backport-release-22.2-94389: POST https://api.github.com/repos/cockroachdb/cockroach/merges: 409 Merge conflict [] you may need to manually resolve merge conflicts with the backport tool. Backport to branch 22.2.x failed. See errors above. 🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is otan. |
These subtle bugs were discovered while creating cockroachdb#94439, the backport of cockroachdb#89358 and cockroachdb#94389 to v22.1. They have already been included in that backport. The backport to v22.2 has not yet been created, and it will include this commit. Release note: None
92327: backupccl: add tenant backup nemesis tests r=msbutler a=stevendanna This adds a bit of randomized testing to stress incremental tenant backups. Tenant backups were previously untenable because of non-MVCC operations. Now that we support MVCC-compatible bulk operations, they should in principal be possible. Epic: CRDB-20264 Release note: None 94442: opt: fix minor mistakes in legacy disjunction stats logic r=mgartner a=mgartner These subtle bugs were discovered while creating #94439, the backport of #89358 and #94389 to v22.1. They have already been included in that backport. The backport to v22.2 has not yet been created, and it will include this commit. Epic: None Release note: None Co-authored-by: Steven Danna <danna@cockroachlabs.com> Co-authored-by: Marcus Gartner <marcus@cockroachlabs.com>
These subtle bugs were discovered while creating cockroachdb#94439, the backport of cockroachdb#89358 and cockroachdb#94389 to v22.1. They have already been included in that backport. The backport to v22.2 has not yet been created, and it will include this commit. Release note: None
These subtle bugs were discovered while creating cockroachdb#94439, the backport of cockroachdb#89358 and cockroachdb#94389 to v22.1. They have already been included in that backport. The backport to v22.2 has not yet been created, and it will include this commit. Release note: None
This commit adds the
optimizer_use_improved_disjunction_statssessionsetting that defaults to
true. Whentrue, the improved disjunctionlogic added in #89358 is performed. When
false, the logic reverts tothe previous logic. This setting will allow use to backport the new
logic without impacting query plans of running clusters by defaulting
the setting to false.
Epic: None
Release note: None