-
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
*: record index name in the slow log instead of index id #11795
Conversation
Codecov Report
@@ Coverage Diff @@
## master #11795 +/- ##
================================================
- Coverage 81.6878% 81.4352% -0.2527%
================================================
Files 435 434 -1
Lines 94216 93478 -738
================================================
- Hits 76963 76124 -839
- Misses 11795 11897 +102
+ Partials 5458 5457 -1 |
Codecov Report
@@ Coverage Diff @@
## master #11795 +/- ##
================================================
+ Coverage 81.4689% 81.5597% +0.0907%
================================================
Files 435 435
Lines 94123 94467 +344
================================================
+ Hits 76681 77047 +366
+ Misses 11955 11937 -18
+ Partials 5487 5483 -4 |
@@ -131,7 +131,7 @@ type StatementContext struct { | |||
MemTracker *memory.Tracker | |||
RuntimeStatsColl *execdetails.RuntimeStatsColl | |||
TableIDs []int64 |
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.
- How about using table names as well?
- How about using the
table_name:index_name
format to display table and index names?
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.
tableIDs is not be printed in the slow log.
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.
If we do not print the table id, how do we know which table is accessed with an index if there are multiple tables doing the join operation?
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.
How about store table_name:index_name
in indexNames?
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.
Sounds reasonable.
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.
done.
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
The slow log document should also be updated.
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
/run-all-tests |
@crazycs520 merge failed. |
/run-all-tests |
What problem does this PR solve?
Index ID is not readable, and we can't know the index id
1
belonged to which table.In This PR:
It will record
tableName:indexName
in slow log.What is changed and how it works?
Check List
Tests
Code changes
Side effects
Related changes
Release Note