-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
query is very slow when keep order is true #54969
Comments
introduced by #35975 |
Maybe we can simply relax the restraction of concurrency when the cop request goes to tiflash. Other changes need more expirements, like here you mentioned:
If the selection pushdown filter a lot data, the cop response packet is small enough, then increase concurrency would not increase the memory usage ... but it's more difficult to predicate how large the return packet would be. |
… coprocessor request (pingcap#55141) ref pingcap#54969
/type regression |
More than 2 oncalls are related to this problem. |
/report customer |
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
tidb/pkg/store/copr/coprocessor.go
Lines 222 to 256 in 0abf3ae
This code is intended to make memory usage more efficient. The basic idea is when keep order is true, there is no need to start too many cop workers to receive data, because we want the data to return by order.
However, if selection pushdown occurs, it may require reading many rows to get the desired data. In that case, keeping the concurrency level too low can significantly slow down performance.
2. What did you expect to see? (Required)
3. What did you see instead (Required)
4. What is your TiDB version? (Required)
master
The text was updated successfully, but these errors were encountered: