-
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
*: add stats version in slow_query and slow log. #10082
*: add stats version in slow_query and slow log. #10082
Conversation
@zz-jason , @lamxTyler PTAL |
…0/tidb into slow-log-stats-version
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
executor/adapter.go
Outdated
if a.Plan == nil { | ||
return nil | ||
} | ||
physicalPlan, ok := a.Plan.(plannercore.PhysicalPlan) |
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.
Some other plan, for example Insert
/Update
, they are not PhysicalPlan
but can have StatsInfo as well. For example, insert into .. select ..
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.
em... any advice for this?
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 specially handle these plans?
Co-Authored-By: crazycs520 <[email protected]>
Codecov Report
@@ Coverage Diff @@
## master #10082 +/- ##
================================================
+ Coverage 77.9619% 77.9816% +0.0197%
================================================
Files 405 405
Lines 82244 82304 +60
================================================
+ Hits 64119 64182 +63
Misses 13392 13392
+ Partials 4733 4730 -3 |
Co-Authored-By: crazycs520 <[email protected]>
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 |
/run-all-tests |
/run-all-tests |
1 similar comment
/run-all-tests |
/run-all-tests |
/run-all-tests |
1 similar comment
/run-all-tests |
/run-all-tests |
/run-all-tests |
/run-sqllogic-test-2 |
/run-unit-test |
/run-all-tests |
/run-code_coverage |
/run-mybatis-test |
/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
What problem does this PR solve?
Stats
to slow log.Stats
print out format istableName:StatsVersion
.Stats
to slow_query.What is changed and how it works?
Add
StatsVersion
toStatsInfo
and removeUsePseudoStats
field, then ifStatsVersion
== 0, means use pseudo stats.Check List
Tests
Code changes
Side effects
Related changes