sql: remove heuristic planner optimization passes#39766
sql: remove heuristic planner optimization passes#39766craig[bot] merged 2 commits intocockroachdb:masterfrom
Conversation
The physical scrub code uses optimizePlan simply to initialize the span in a scanNode; do that directly instead. Release note: None
|
So much code deletion!!! |
|
This is great. Next step is to remove planNode altogether! (not reviewing in detail because I've lost touch of the specifics. But I'm 100% behind the change.) |
|
Thanks! Yeah, I started trying to rip out the planning part ( |
jordanlewis
left a comment
There was a problem hiding this comment.
Wow this is the dream!!1
Reviewed 2 of 2 files at r1.
Reviewable status:complete! 1 of 0 LGTMs obtained (waiting on @jordanlewis, @knz, and @RaduBerinde)
pkg/sql/scan.go, line 469 at r2 (raw file):
} func isFilterTrue(expr tree.TypedExpr) bool {
nit: this feels random, any reason why it doesn't live next to its use in join_predicate?
jordanlewis
left a comment
There was a problem hiding this comment.
Haha I didn't mean to put that sarcastic looking trailing 1 - only sincere happiness from me!
Reviewable status:
complete! 1 of 0 LGTMs obtained (waiting on @jordanlewis, @knz, and @RaduBerinde)
Removing the "optimization" part of the heuristic planner, and any code that becomes unused. We still keep the limit propagation pass; it will go away when the optimizer has intelligence around soft limits. A small fix that happened naturally is to propagate limits on `EXPLAIN` which more accurately reflects the actual execution. Release note: None
4ea9427 to
b145ff1
Compare
RaduBerinde
left a comment
There was a problem hiding this comment.
Haha, TFTR!
Reviewable status:
complete! 1 of 0 LGTMs obtained (waiting on @jordanlewis and @knz)
pkg/sql/scan.go, line 469 at r2 (raw file):
Previously, jordanlewis (Jordan Lewis) wrote…
nit: this feels random, any reason why it doesn't live next to its use in join_predicate?
It's also used in this file. I believe the use in join_predicate will also go away soon. I moved it to opt_limits.go since it's used there more and the scanNode use is also related to limits.
|
bors r+ |
39766: sql: remove heuristic planner optimization passes r=RaduBerinde a=RaduBerinde #### sql: don't use optimizePlan for scrub check The physical scrub code uses optimizePlan simply to initialize the span in a scanNode; do that directly instead. Release note: None #### sql: remove heuristic planner optimization passes Removing the "optimization" part of the heuristic planner, and any code that becomes unused. We still keep the limit propagation pass; it will go away when the optimizer has intelligence around soft limits. A small fix that happened naturally is to propagate limits on `EXPLAIN` which more accurately reflects the actual execution. Release note: None Co-authored-by: Radu Berinde <radu@cockroachlabs.com>
Build succeeded |
sql: don't use optimizePlan for scrub check
The physical scrub code uses optimizePlan simply to initialize the
span in a scanNode; do that directly instead.
Release note: None
sql: remove heuristic planner optimization passes
Removing the "optimization" part of the heuristic planner, and any
code that becomes unused.
We still keep the limit propagation pass; it will go away when the
optimizer has intelligence around soft limits.
A small fix that happened naturally is to propagate limits on
EXPLAINwhich more accurately reflects the actual execution.Release note: None