TiDB Always Has Slow SQL

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

Original topic: tidb永远有慢sql

| username: tidb狂热爱好者

[TiDB Usage Environment] Production Environment / Testing / PoC
[TiDB Version]
[Reproduction Path] What operations were performed when the issue occurred
[Encountered Issues: Issue Phenomenon and Impact]
[Resource Configuration]
[Attachments: Screenshots / Logs / Monitoring]
Single node expanded from 1KV to 3KV, each table has long-tail SQL
Execution time must be encountered to stop. Previously, expanding from 1KV 5.4 to 4KV always had SQL timeouts for each table. Is it because the KV number is even?

| username: xfworld | Original post link

It has nothing to do with whether kv is even, but it is related to the setting of the number of replicas.

1kv → 4kv requires region replica scheduling and balanced distribution. You need to check whether the distribution of the relevant table and region is complete.

Then look at the SQL pushdown operation to see if it is properly distributed to each node for execution.

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

Check in Grafana to see if the load balancing across nodes is complete.

| username: 孤君888 | Original post link

Are the hardware configurations of the expanded nodes consistent with the original nodes?

| username: ShawnYan | Original post link

What kind of SQL will become a long-tail SQL?