Skip to content
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

opt: improve the rule that converts COUNT to COUNT_ROWS #49126

Merged
merged 1 commit into from May 18, 2020

Conversation

RaduBerinde
Copy link
Member

Improve the ConvertCountToCountRows rule to check for any scalar expression that
is never null, not just bare variable references.

Release note (performance improvement): COUNT is now converted to COUNT(*)
(aka COUNT_ROWS) in more cases.

@RaduBerinde RaduBerinde requested a review from a team as a code owner May 15, 2020 17:31
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Improve the ConvertCountToCountRows rule to check for any scalar expression that
is never null, not just bare variable references.

Release note (performance improvement): `COUNT` is now converted to `COUNT(*)`
(aka `COUNT_ROWS`) in more cases.
Copy link
Collaborator

@rytaft rytaft 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 3 of 3 files at r1.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @mgartner)

Copy link
Member Author

@RaduBerinde RaduBerinde left a comment

Choose a reason for hiding this comment

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

bors r+

Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @mgartner)

@craig
Copy link
Contributor

craig bot commented May 18, 2020

Build succeeded

@craig craig bot merged commit 2090a5b into cockroachdb:master May 18, 2020
@RaduBerinde RaduBerinde deleted the count-to-count-rows branch May 18, 2020 20:55
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.

None yet

4 participants