All TiDB queries suddenly become very slow, taking more than 5 minutes

This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: tidb突然所有查询都变得很慢超过5分钟

| username: hyman

Suddenly all queries have become extremely slow. Due to network restrictions, I can’t access the monitoring interface. Through PD, I found that there aren’t many slow SQL queries. I hope experts can provide some troubleshooting ideas.

| username: tidb狂热爱好者 | Original post link

Go to the dashboard to see all the SQL queries. Optimize the top SQL query that consumes the most actual CPU time.

| username: hyman | Original post link

The dashboard is also not visible. Can it be viewed through an SQL query or some command?

| username: bert | Original post link

In cases where all SQL queries are slow, it is recommended to first check the CPU, memory, I/O, and network on the system.

| username: hey-hoho | Original post link

Check the system table information_schema.cluster_slow_query to see which specific stage is slow.

| username: zhanggame1 | Original post link

You can also use “explain analyze” to see exactly where the slow SQL is slow.

| username: weixiaobing | Original post link

This situation is generally caused by issues with underlying resources. It is recommended to first check system resources, including disk and network.

| username: kkpeter | Original post link

Quickly check the health of key business tables. It might be that low health and inaccurate statistics are causing the execution plan to go awry. The business side should throttle and execute ANALYZE TABLE.

| username: 摊煎饼果子的蒙其 | Original post link

Check the execution plan, or use the cluster_slow_query under the information_schema database, and look at them together.

| username: system | Original post link

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.