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

executor: reuse chunk to reduce memory usage in union scan #7717

Merged
merged 1 commit into from
Sep 17, 2018

Conversation

jackysp
Copy link
Member

@jackysp jackysp commented Sep 16, 2018

What problem does this PR solve?

For a large transaction, union scan uses lots of memory which is harmful to the performance.

What is changed and how it works?

Reuse chunk in when build added rows.

Check List

Tests

  • Unit test
  • Manual test (add detailed scripts or steps below)
    execute 4900 update statements which affected 4900 rows in one transaction.
master this PR
17.944s 7.079s

Code changes

  • Has exported function/method change

Side effects

  • Increased code complexity

PTAL @coocood @lysu

@jackysp jackysp added the sig/execution SIG execution label Sep 16, 2018
@shenli
Copy link
Member

shenli commented Sep 16, 2018

Good job!

@shenli
Copy link
Member

shenli commented Sep 16, 2018

/run-all-tests

@coocood
Copy link
Member

coocood commented Sep 16, 2018

LGTM

@coocood coocood added status/LGT1 Indicates that a PR has LGTM 1. status/all tests passed labels Sep 16, 2018
Copy link
Contributor

@XuHuaiyu XuHuaiyu left a comment

Choose a reason for hiding this comment

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

LGTM

@coocood coocood merged commit b6a540a into pingcap:master Sep 17, 2018
@jackysp jackysp deleted the reuse_scan branch October 8, 2018 06:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sig/execution SIG execution status/LGT1 Indicates that a PR has LGTM 1. type/performance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants