Skip to content

sql: disable histogram usage for internal executor#104443

Merged
craig[bot] merged 1 commit intocockroachdb:masterfrom
mgartner:102954-temp-fix-for-perf-regression
Jun 6, 2023
Merged

sql: disable histogram usage for internal executor#104443
craig[bot] merged 1 commit intocockroachdb:masterfrom
mgartner:102954-temp-fix-for-perf-regression

Conversation

@mgartner
Copy link
Copy Markdown
Contributor

@mgartner mgartner commented Jun 6, 2023

Since #101486, the internal executor has used global defaults for
session settings. This effectively enabled optimizer_use_histograms
for the internal executor, which was disabled before. This caused a
huge performance regression. The root cause of the regression is not yet
understood. This commit disables optimizer_use_histograms as a
temporary solution for the performance regression.

Informs #102954

Epic: None

Release note: None

Since cockroachdb#101486, the internal executor has used global defaults for
session settings. This effectively enabled `optimizer_use_histograms`
for the internal executor, which was disabled before. This caused a
huge performance regression. The root cause of the regression is not yet
understood. This commit disables `optimizer_use_histograms` as a
temporary solution for the performance regression.

Informs cockroachdb#102954

Release note: None
@mgartner mgartner requested review from a team, DrewKimball and rafiss June 6, 2023 20:14
@blathers-crl
Copy link
Copy Markdown

blathers-crl bot commented Jun 6, 2023

It looks like your PR touches production code but doesn't add or edit any test code. Did you consider adding tests to your PR?

🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf.

@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

@mgartner
Copy link
Copy Markdown
Contributor Author

mgartner commented Jun 6, 2023

Here's the SQL QPS before and after this change on kv0/enc=false/nodes=3/cpu=96:

Screenshot 2023-06-06 at 16 14 58

Copy link
Copy Markdown
Collaborator

@rafiss rafiss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for tracking this down!

Copy link
Copy Markdown
Collaborator

@DrewKimball DrewKimball left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewed 1 of 1 files at r1, all commit messages.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @mgartner)

@mgartner
Copy link
Copy Markdown
Contributor Author

mgartner commented Jun 6, 2023

TFTRs!

bors r+

Copy link
Copy Markdown
Collaborator

@michae2 michae2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewed 1 of 1 files at r1, all commit messages.
Reviewable status: :shipit: complete! 2 of 0 LGTMs obtained (waiting on @mgartner)

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Jun 6, 2023

Build failed (retrying...):

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Jun 6, 2023

Build failed (retrying...):

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Jun 6, 2023

Build succeeded:

@craig craig bot merged commit d89eebf into cockroachdb:master Jun 6, 2023
@michae2
Copy link
Copy Markdown
Collaborator

michae2 commented Jun 6, 2023

Do we want to backport this to v23.1?

@mgartner mgartner deleted the 102954-temp-fix-for-perf-regression branch June 7, 2023 13:40
@mgartner
Copy link
Copy Markdown
Contributor Author

mgartner commented Jun 7, 2023

Do we want to backport this to v23.1?

I don't think so. #101486 introduced the regression and that was not backported to v23.1, AFAICT.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants