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
MergeTreePrefetchedReadPool disable for LIMIT only queries #58505
MergeTreePrefetchedReadPool disable for LIMIT only queries #58505
Conversation
This is an automated comment for commit d9f68f4 with description of existing statuses. It's updated for the latest CI running ❌ Click here to open a full report in a separate page Successful checks
|
Query:
Processors log:
If we disable this prefetched read pool:
Logs:
We spend in MergeTreePrefetchedReadPool::fillPerThreadTasks around 21 seconds, because LIMIT is not applied to ranges that we want to read. For LIMIT only queries we should not use MergeTreePrefetchedReadPool. This is proper fix #58504. |
…a868b7edf45489b6241b7d50cba169 Cherry pick #58505 to 23.10: MergeTreePrefetchedReadPool disable for LIMIT only queries
…a868b7edf45489b6241b7d50cba169 Cherry pick #58505 to 23.11: MergeTreePrefetchedReadPool disable for LIMIT only queries
…a868b7edf45489b6241b7d50cba169 Cherry pick #58505 to 23.12: MergeTreePrefetchedReadPool disable for LIMIT only queries
Backport #58505 to 23.10: MergeTreePrefetchedReadPool disable for LIMIT only queries
Backport #58505 to 23.12: MergeTreePrefetchedReadPool disable for LIMIT only queries
Backport #58505 to 23.11: MergeTreePrefetchedReadPool disable for LIMIT only queries
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
MergeTreePrefetchedReadPool disable for LIMIT only queries, because time spend during filling per thread tasks can be greater than whole query execution for big tables with small limit.