-
- Downloads
Rewrite the planner's handling of materialized plan types so that there is
an explicit model of rescan costs being different from first-time costs. The costing of Material nodes in particular now has some visible relationship to the actual runtime behavior, where before it was essentially fantasy. This also fixes up a couple of places where different materialized plan types were treated differently for no very good reason (probably just oversights). A couple of the regression tests are affected, because the planner now chooses to put the other relation on the inside of a nestloop-with-materialize. So far as I can see both changes are sane, and the planner is now more consistently following the expectation that it should prefer to materialize the smaller of two relations. Per a recent discussion with Robert Haas.
Showing
- src/backend/executor/execAmi.c 28 additions, 1 deletionsrc/backend/executor/execAmi.c
- src/backend/optimizer/path/costsize.c 158 additions, 54 deletionssrc/backend/optimizer/path/costsize.c
- src/backend/optimizer/path/joinpath.c 5 additions, 12 deletionssrc/backend/optimizer/path/joinpath.c
- src/backend/optimizer/plan/createplan.c 2 additions, 1 deletionsrc/backend/optimizer/plan/createplan.c
- src/backend/optimizer/plan/subselect.c 7 additions, 23 deletionssrc/backend/optimizer/plan/subselect.c
- src/backend/optimizer/util/pathnode.c 4 additions, 2 deletionssrc/backend/optimizer/util/pathnode.c
- src/include/executor/executor.h 2 additions, 1 deletionsrc/include/executor/executor.h
- src/include/optimizer/cost.h 3 additions, 2 deletionssrc/include/optimizer/cost.h
- src/test/regress/expected/geometry.out 12 additions, 12 deletionssrc/test/regress/expected/geometry.out
- src/test/regress/expected/geometry_1.out 12 additions, 12 deletionssrc/test/regress/expected/geometry_1.out
- src/test/regress/expected/geometry_2.out 12 additions, 12 deletionssrc/test/regress/expected/geometry_2.out
- src/test/regress/expected/join.out 789 additions, 789 deletionssrc/test/regress/expected/join.out
Loading
Please register or sign in to comment