Skip to content
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

Always push down TopN when N is less than a specific variable #26089

Closed
Tracked by #26085
time-and-fate opened this issue Jul 9, 2021 · 2 comments · Fixed by #26550
Closed
Tracked by #26085

Always push down TopN when N is less than a specific variable #26089

time-and-fate opened this issue Jul 9, 2021 · 2 comments · Fixed by #26550
Labels
sig/planner SIG: Planner type/enhancement The issue or PR belongs to an enhancement.

Comments

@time-and-fate
Copy link
Member

Enhancement

Currently, in the planner, the choice between push down TopN or not is cost-based. But sometimes the cost calculation is not accurate enough to make the correct choice. When we choose not to push down TopN when it should, the SQL execution will become very slow sometimes. Considering the risk and benefit, always choose to push down the TopN may be a better strategy.

@time-and-fate time-and-fate added the type/enhancement The issue or PR belongs to an enhancement. label Jul 9, 2021
@time-and-fate
Copy link
Member Author

/sig planner

@ti-chi-bot ti-chi-bot added the sig/planner SIG: Planner label Jul 9, 2021
@qw4990 qw4990 changed the title Always push down TopN Always push down TopN when N is less than a specific variable Jul 26, 2021
@qw4990
Copy link
Contributor

qw4990 commented Jul 26, 2021

Please see #26550 for more details

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sig/planner SIG: Planner type/enhancement The issue or PR belongs to an enhancement.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants