-
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
explain analyze support DML statement #18056
Comments
Could you describe more on the use scenarios and the motivation of this feature request? |
Typically, explain analyze is used for postmortem analysis. For example, we found a statement executed too slow, wish to investigate where the time spent on. I'm afraid it's not suitable for |
@zz-jason Sorry, Already add a My original intention is want to record Since |
Gotcha, that makes sense to me.@SunRunAway @qw4990 What's your opinion? |
Make sense to me. |
Make sense to me, but I think we should add extra fields in slow logs for some important behaviors(for example, time cost on |
/assign |
Added documentation for alerting users it has no explain result for DML now, pingcap/docs-cn#4059 |
… DML in explain analyze pingcap#18056
… DML in explain analyze pingcap#18056 Signed-off-by: jianyilyu <jianyilyu@126.com>
Signed-off-by: jianyilyu <jianyilyu@126.com>
Signed-off-by: jianyilyu <jianyilyu@126.com>
Signed-off-by: jianyilyu <jianyilyu@126.com>
Signed-off-by: jianyilyu <jianyilyu@126.com>
Signed-off-by: jianyilyu <jianyilyu@126.com>
Background
After #17573, TiDB maybe records the executor runtime information in slow log.
But currently, the executor runtime information doesn't contain the
insert/update/delete
executor runtime information.Feature Request
explain analyze
also need the executor runtime information to display. Currently, explain analyze DML(insert/delete/update
) will return not return the runtime information, here is an example:Describe the feature you'd like:
Add runtime information for DML in explain analyze too. Such as:
rpc time
execute: add rpc runtime stats information for insert/update/replace statement #19334memory
prewrite_time
,commit_time
: executor: add transaction commit runtime information in slow log #19366. . .
Here is an example:
And then, we can record the
insert/update/delete
executor runtime information in slow-log.There is some information we can add for DML and PointGet in explain analyze results (or slow logs):
For
PointGet
orBatchGet
:PointGet
executor: add runtime information for point-get executor #18666BatchGet
executor: add runtime information for the batch-point-get executor #18828For DML:
AutoIncreID/HandleID/AutoRandID
Describe alternatives you've considered:
Teachability, Documentation, Adoption, Migration Strategy:
The text was updated successfully, but these errors were encountered: