SQL Query Issues

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

Original topic: sql 查询问题

| username: rw12306

[TiDB Usage Environment] Production Environment / Testing / PoC
[TiDB Version] v6.1

Has anyone encountered this issue? Initially, querying one month’s data was very fast, but later, when I changed it to query one year’s data, it couldn’t retrieve the data. After terminating this query SQL, I immediately changed it back to querying one month’s data, but it still couldn’t retrieve the one month’s data. I had to wait a while before it could query the one month’s data.

This raises a problem: if the previous SQL query fails to retrieve data while the program is running, it will affect the execution of subsequent SQL queries.

| username: Kongdom | Original post link

Uh… I haven’t encountered this situation. Could it be that the previous large query exhausted the resources, causing the subsequent queries to run slowly?

| username: alfred | Original post link

This needs to be looked at specifically; such cases are very rare.

| username: rw12306 | Original post link

If the resources are exhausted, the connection should be released as soon as possible if it is disconnected. I am currently encountering many situations like this: if the first SQL query is very slow, the subsequent SQL queries also become slow.

| username: Min_Chen | Original post link

Hello, this situation requires a detailed diagnosis. You can collect the clinic monitoring data for us to review together.

| username: system | Original post link

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