mirror of
https://github.com/postgres/postgres.git
synced 2025-06-27 23:21:58 +03:00
Add an 'enable_material' GUC.
The logic for determining whether to materialize has been significantly overhauled for 9.0. In case there should be any doubt about whether materialization is a win in any particular case, this should provide a convenient way of seeing what happens without it; but even with enable_material turned off, we still materialize in cases where it is required for correctness. Thanks to Tom Lane for the review.
This commit is contained in:
@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/optimizer/path/joinpath.c,v 1.132 2010/03/28 22:59:32 tgl Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/optimizer/path/joinpath.c,v 1.133 2010/04/19 00:55:25 rhaas Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -437,10 +437,12 @@ match_unsorted_outer(PlannerInfo *root,
|
||||
else if (nestjoinOK)
|
||||
{
|
||||
/*
|
||||
* Consider materializing the cheapest inner path, unless it is one
|
||||
* that materializes its output anyway.
|
||||
* Consider materializing the cheapest inner path, unless
|
||||
* enable_material is off or the path in question materializes its
|
||||
* output anyway.
|
||||
*/
|
||||
if (!ExecMaterializesOutput(inner_cheapest_total->pathtype))
|
||||
if (enable_material &&
|
||||
!ExecMaterializesOutput(inner_cheapest_total->pathtype))
|
||||
matpath = (Path *)
|
||||
create_material_path(innerrel, inner_cheapest_total);
|
||||
|
||||
|
Reference in New Issue
Block a user