-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
Cost model of aggregation should consider the agg type. #11948
Comments
Besides from |
That's another problem. We can support split agg functions one by one, and resolve it step by step. Then add a rule to merge the same agg functions for a |
How about the cost of |
When thinking about the null column situation, this split may cause wrong results. |
Does the cost model needs to be updated systematically since performance characters are very different in TiKV batch execution model compared to the old execution model? |
That's necessary. We should take it into consideration in future. |
Feature Request
Is your feature request related to a problem? Please describe:
In pull request #11926. We found the coprocessor of tikv execute
avg
very similar withsum
andcount
. But the cost model always regards its a more expensive plan. The reason is the cost model of aggregation only take the number of agg functions into consideration. So we should improve the cost model by taking care of the type of agg functions.Describe the feature you'd like:
Improve the cost model of aggregation by taking care of the type of agg functions.
Describe alternatives you've considered:
None.
The text was updated successfully, but these errors were encountered: