summaryrefslogtreecommitdiff
path: root/src/include/optimizer
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2009-11-15 02:45:35 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2009-11-15 02:45:35 +0000
commitcaf9c830d9d1180ab693f8a6eb205f5862174158 (patch)
treea9a6d4d79bedc2a62e87cd7eeea1bffa18e1836b /src/include/optimizer
parent29faadcd2780f74550d6a983a81bc6bad3967bd6 (diff)
downloadpostgresql-caf9c830d9d1180ab693f8a6eb205f5862174158.tar.gz
Improve planning of Materialize nodes inserted atop the inner input of a
mergejoin to shield it from doing mark/restore and refetches. Put an explicit flag in MergePath so we can centralize the logic that knows about this, and add costing logic that considers using Materialize even when it's not forced by the previously-existing considerations. This is in response to a discussion back in August that suggested that materializing an inner indexscan can be helpful when the refetch percentage is high enough.
Diffstat (limited to 'src/include/optimizer')
-rw-r--r--src/include/optimizer/cost.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/include/optimizer/cost.h b/src/include/optimizer/cost.h
index f862979c08..041b7e8f9d 100644
--- a/src/include/optimizer/cost.h
+++ b/src/include/optimizer/cost.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/optimizer/cost.h,v 1.98 2009/09/12 22:12:04 tgl Exp $
+ * $PostgreSQL: pgsql/src/include/optimizer/cost.h,v 1.99 2009/11/15 02:45:35 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -84,7 +84,6 @@ extern void cost_recursive_union(Plan *runion, Plan *nrterm, Plan *rterm);
extern void cost_sort(Path *path, PlannerInfo *root,
List *pathkeys, Cost input_cost, double tuples, int width,
double limit_tuples);
-extern bool sort_exceeds_work_mem(Sort *sort);
extern void cost_material(Path *path,
Cost input_startup_cost, Cost input_total_cost,
double tuples, int width);