-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
*:Speed up parse slow-log when query slow_query #15371 (#19139) #20556
*:Speed up parse slow-log when query slow_query #15371 (#19139) #20556
Conversation
Signed-off-by: ti-srebot <[email protected]>
/run-all-tests |
No release note, Please follow https://github.com/pingcap/community/blob/master/contributors/release-note-checker.md |
Signed-off-by: jyz0309 <[email protected]>
No release note, Please follow https://github.com/pingcap/community/blob/master/contributors/release-note-checker.md |
/run-all-tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
/merge |
Sorry @crazycs520, this branch cannot be merged without an approval of release maintainers |
/merge |
/rebuild |
/run-all-tests |
cherry-pick #19139 to release-4.0
What problem does this PR solve?
Issue Number: close #15354
Problem Summary:
After Issue #15354 laster, the performance improvement is not significant. The Read slow log file and parse process are slow.
What is changed and how it works?
What's Changed:
In the slow log query process, the two steps of reading the log and parsing the log have been serialized. Here, the step of parsing the log is put into the go routine to make it concurrent.
For query 300M tidb-slow.log:
-- before this PR;
Spend 4.75s
-- this PR;
Spend 1.25-1.30s
Improve slow log query efficiency by 4 times.
How it Works:
the step of parsing the log is put into the go routine to make it concurrent.
Related changes
pingcap/tidb/executor/slow_query.go
:Check List
Tests
Side effects
Release note