Open qw4990 opened 3 years ago
PTAL @wshwsh12 @XuHuaiyu @SunRunAway @zz-jason
Not only the SQLs and heap profile will be recorded, but also the expensive query log, and the plan will also be recorded.
I think what you really needed is the result of explain analyze for conn
?
Feature Request
Is your feature request related to a problem? Please describe:
After https://github.com/pingcap/tidb/issues/17095, TiDB can dump SQLs and the heap profile when consuming most of the system memory(like 80% of system memory), which helps us investigate memory problems.
But the information above may be not enough, it's better to record all ongoing SQLs' execution details(like
explain analyze
) as well. (we can useexplain for connectionID
to get all execution details)With these details, we can know actual plans of these SQLs, and memory usages of all operators in these plans. This information can help us verify something like
if there is an inappropriate join-order
andwhich join consumes the most memory
, which is useful when investigating memory problems.