-
Notifications
You must be signed in to change notification settings - Fork 276
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
[perf] improve delete from table without where & limit #13120
Conversation
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.
这应该是个不合理的改法,应该一个优化器规则,几十行代码就可以处理这个问题
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.
做成优化器的规则如何呢。而不是物理计划的一个if else
现在的ddl不是一个算子的形式,ddl的参数直接从plan中获取,这个if else应该没办法避免 |
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.
处理一下影响行数的问题
…13120) When a table does not have a foreign key. So for delete from table, it can be optimized to truncate. Approved by: @m-schen, @nnsgmsone, @badboynt1, @aunjgr, @ouyuanning (cherry picked from commit 118e577)
What type of PR is this?
Which issue(s) this PR fixes:
issue #12845
What this PR does / why we need it:
When a table does not have a foreign key. So for delete from table, it can be optimized to truncate.