-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Performance improvements - Planner #16631
Conversation
Review ChecklistHello reviewers! 👋 Please follow this checklist when reviewing this Pull Request. General
Tests
Documentation
New flags
If a workflow is added or modified:
Backward compatibility
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #16631 +/- ##
==========================================
- Coverage 68.99% 68.93% -0.06%
==========================================
Files 1562 1562
Lines 200754 200758 +4
==========================================
- Hits 138508 138393 -115
- Misses 62246 62365 +119 ☔ View full report in Codecov by Sentry. |
Signed-off-by: Andres Taylor <[email protected]>
Signed-off-by: Andres Taylor <[email protected]>
Signed-off-by: Andres Taylor <[email protected]>
Signed-off-by: Andres Taylor <[email protected]>
Signed-off-by: Andres Taylor <[email protected]>
if len(operators) < 2 { | ||
panic("incorrect count of inputs for FkCascade") | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should put all these checks behind a debug mode? 🤔 Would that help us in debugging when a user reports a query is not working as intended? Also, won't removing these make some plans pass that would otherwise panic that could return wrong rows?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed the code so that we now only use SetInputs()
on the output of GetInputs()
. Is that enough you think?
Signed-off-by: Andres Taylor <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These improvements are really impressive given the small change set, congrats! 🎉
Good Riddance to calling Clone in rewriters |
Description
This PR focuses on improving the performance of the Vitess planner by analyzing profiler output and implementing optimizations that reduce execution time, memory usage, and allocations. The changes are aimed at making the planner faster and more efficient, especially for complex queries.
Benchmark Results
The benchmarks were run on an Apple M1 Ultra and demonstrate significant improvements across various metrics:
Execution Time (sec/op):
Memory Usage (B/op):
Allocations (allocs/op):
Related Issue(s)
#16789
Checklist
Deployment Notes