-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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: Reduce the memory usage of InsertExec #14568
Conversation
@b41sh Thanks for your amazing work! |
Could you show the difference of go pprof heap? @b41sh |
alloc_space of insertRows drop from 11.45MB to 0.77MB |
Thank, @b41sh ! But it doesn't seem to be a great improvement. Can you analyze the reason? Because this modification may bring some negative effects, such as making the insert ignore / on duplicate update statement call the BatchGet interface more times. We needs to better balance pros and cons. |
|
What problem does this PR solve?
InsertExec consumes too much memory 14355
What is changed and how it works?
allocate less rows and batch exec.
we can see memory usage of insert 500,000 rows reduce from 2.3GB to 1.7GB
Check List
Tests