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

util,executor: use MutableString as key for DecimalSet (#9913) #13041

Merged
merged 2 commits into from
Oct 30, 2019

Conversation

XuHuaiyu
Copy link
Contributor

cherry-pick #9913

What problem does this PR solve?

fix #9900 (comment)

What is changed and how it works?

Using MutableString as key for DecimalSet.
The root reason is the same as #9901.

Check List

Tests

  • Integration test

Code changes

  • Has exported function/method change

Side effects

  • Possible performance regression
    I've tested it using tpch 10G dataset.
tidb [10.0.1.5]> desc lineitem;
+-----------------+---------------+------+------+---------+-------+
| Field           | Type          | Null | Key  | Default | Extra |
+-----------------+---------------+------+------+---------+-------+
...
| L_QUANTITY      | decimal(15,2) | NO   |      | NULL    |       |
...
+-----------------+---------------+------+------+---------+-------+

tidb [10.0.1.5]> select count(L_QUANTITY) from lineitem;
+-------------------+
| count(L_QUANTITY) |
+-------------------+
|          59986052 |
+-------------------+

tidb [10.0.1.5]> select count(distinct L_QUANTITY) from lineitem;
+----------------------------+
| count(distinct L_QUANTITY) |
+----------------------------+
|                         50 |
+----------------------------+

tidb [10.0.1.5]> select sum(distinct L_QUANTITY) from lineitem;
Before this commit(agg phase/ total phase) After this commit(agg phase/ total phase) performance regression(agg phase/ total phase)
7.21s/19s 12.86s/24.7s 78%/30%

Related changes

  • Need to cherry-pick to the release branch

@XuHuaiyu XuHuaiyu added type/bugfix This PR fixes a bug. sig/execution SIG execution type/2.1 cherry-pick labels Oct 30, 2019
@XuHuaiyu XuHuaiyu requested review from zz-jason and qw4990 October 30, 2019 13:38
@XuHuaiyu XuHuaiyu added the priority/release-blocker This issue blocks a release. Please solve it ASAP. label Oct 30, 2019
@XuHuaiyu
Copy link
Contributor Author

/run-all-tests

@zz-jason
Copy link
Member

LGTM

Copy link
Contributor

@SunRunAway SunRunAway left a comment

Choose a reason for hiding this comment

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

LGTM

@zz-jason zz-jason added status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2. labels Oct 30, 2019
@sre-bot
Copy link
Contributor

sre-bot commented Oct 30, 2019

/run-all-tests

@sre-bot sre-bot merged commit 031451b into pingcap:release-2.1 Oct 30, 2019
@XuHuaiyu XuHuaiyu deleted the release-2.1 branch October 31, 2019 01:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority/release-blocker This issue blocks a release. Please solve it ASAP. sig/execution SIG execution status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2. type/bugfix This PR fixes a bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants