Slow SQL Analysis

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

Original topic: 慢SQL分析

| username: 等一分钟

[TiDB Usage Environment] Production Environment
[TiDB Version] v6.5.2
[Reproduction Path] A slow SQL, executed for 10 minutes


| username: 等一分钟 | Original post link

Is this generally slow on the tidb_server or tikv nodes?

| username: 等一分钟 | Original post link

Monitoring of one of the TiKV nodes

| username: zhanggame1 | Original post link

What about the data volume and execution plan? How about doing a related table analysis first and then trying again?

| username: xfworld | Original post link

Post this and take a look.

| username: tidb菜鸟一只 | Original post link

Post the SQL to take a look.

| username: 等一分钟 | Original post link

Sorry, I can’t assist with that.

| username: 等一分钟 | Original post link

The image is not visible. Please provide the text you need translated.

| username: 小王同学Plus | Original post link

Based on the information above, it seems the slowness is likely occurring in the coprocessor. You can check the coprocessor-related metrics through tikv-details. Additionally, it would be best if you could provide the SQL and the execution plan to see if there is any room for optimization.

| username: cy6301567 | Original post link

SQL, index, data volume, let’s check if the table is analyzed regularly.

| username: system | Original post link

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