Skip to content
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

dashboard queries cluster_statements_summary_history causes tidb-server OOM #1386

Closed
XuHuaiyu opened this issue Aug 8, 2022 · 0 comments · Fixed by #1385
Closed

dashboard queries cluster_statements_summary_history causes tidb-server OOM #1386

XuHuaiyu opened this issue Aug 8, 2022 · 0 comments · Fixed by #1385
Labels

Comments

@XuHuaiyu
Copy link

XuHuaiyu commented Aug 8, 2022

Bug Report

Please answer these questions before submitting your issue. Thanks!

What did you do?
As the title says.
飞书20220808-153854

We see some sql like this :

 SELECT FLOOR(UNIX_TIMESTAMP(MIN(summary_begin_time))) AS agg_begin_time, FLOOR(UNIX_TIMESTAMP(MAX(summary_end_time))) AS agg_end_time, ANY_VALUE(digest_text) AS agg_digest_text, ANY_VALUE(digest) AS agg_digest, SUM(exec_count) AS agg_exec_count, SUM(sum_latency) AS agg_sum_latency, MAX(max_latency) AS agg_max_latency, MIN(min_latency) AS agg_min_latency, CAST(SUM(exec_count * avg_latency) / SUM(exec_count) AS SIGNED) AS agg_avg_latency, ANY_VALUE(schema_name) AS agg_schema_name, COUNT(DISTINCT plan_digest) AS agg_plan_count FROM `INFORMATION_SCHEMA`.`CLUSTER_STATEMENTS_SUMMARY_HISTORY` WHERE (summary_begin_time <= FROM_UNIXTIME(?) AND summary_end_time >= FROM_UNIXTIME(?)) AND (LOWER(digest_text) REGEXP ?
                                 OR LOWER(digest) REGEXP ?
                                 OR LOWER(schema_name) REGEXP ?
                                 OR LOWER(table_names) REGEXP ?
                                 OR LOWER(plan) REGEXP ?) GROUP BY schema_name, digest ORDER BY agg_sum_latency DESC

What did you expect to see?

TiDB does not OOM

What did you see instead?

TiDB OOM

What version of TiDB Dashboard are you using (./tidb-dashboard --version)?

v6.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant