aboutsummaryrefslogtreecommitdiff
path: root/src/backend/optimizer
diff options
context:
space:
mode:
authorNeil Conway <neilc@samurai.com>2004-04-25 18:23:57 +0000
committerNeil Conway <neilc@samurai.com>2004-04-25 18:23:57 +0000
commit1812d3b233e40d6e94e2105c3da4b1fca93c9385 (patch)
tree8e121bc3cc1d8951e7c94f1c590296bae80765bd /src/backend/optimizer
parenta3015829ee0ec22917a5e1a6ee3432fa8ef3a811 (diff)
downloadpostgresql-1812d3b233e40d6e94e2105c3da4b1fca93c9385.tar.gz
postgresql-1812d3b233e40d6e94e2105c3da4b1fca93c9385.zip
Remove the last traces of Joe Hellerstein's "xfunc" optimization. Patch
from Alvaro Herrera. Also, removed lispsort.c, since it is no longer used.
Diffstat (limited to 'src/backend/optimizer')
-rw-r--r--src/backend/optimizer/path/allpaths.c12
-rw-r--r--src/backend/optimizer/plan/createplan.c15
-rw-r--r--src/backend/optimizer/util/pathnode.c13
-rw-r--r--src/backend/optimizer/util/relnode.c4
4 files changed, 9 insertions, 35 deletions
diff --git a/src/backend/optimizer/path/allpaths.c b/src/backend/optimizer/path/allpaths.c
index 50d5006a960..5d92fc4c5d1 100644
--- a/src/backend/optimizer/path/allpaths.c
+++ b/src/backend/optimizer/path/allpaths.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/optimizer/path/allpaths.c,v 1.112 2004/01/14 23:01:55 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/optimizer/path/allpaths.c,v 1.113 2004/04/25 18:23:56 neilc Exp $
*
*-------------------------------------------------------------------------
*/
@@ -531,16 +531,6 @@ make_one_rel_by_joins(Query *root, int levels_needed, List *initial_rels)
{
rel = (RelOptInfo *) lfirst(x);
-#ifdef NOT_USED
-
- /*
- * * for each expensive predicate in each path in each
- * distinct rel, * consider doing pullup -- JMH
- */
- if (XfuncMode != XFUNC_NOPULL && XfuncMode != XFUNC_OFF)
- xfunc_trypullup(rel);
-#endif
-
/* Find and save the cheapest paths for this rel */
set_cheapest(rel);
diff --git a/src/backend/optimizer/plan/createplan.c b/src/backend/optimizer/plan/createplan.c
index 5b52a63f025..1b4c9d47809 100644
--- a/src/backend/optimizer/plan/createplan.c
+++ b/src/backend/optimizer/plan/createplan.c
@@ -10,7 +10,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/optimizer/plan/createplan.c,v 1.168 2004/02/29 17:36:05 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/optimizer/plan/createplan.c,v 1.169 2004/04/25 18:23:56 neilc Exp $
*
*-------------------------------------------------------------------------
*/
@@ -167,19 +167,6 @@ create_plan(Query *root, Path *best_path)
break;
}
-#ifdef NOT_USED /* fix xfunc */
- /* sort clauses by cost/(1-selectivity) -- JMH 2/26/92 */
- if (XfuncMode != XFUNC_OFF)
- {
- set_qpqual((Plan) plan,
- lisp_qsort(get_qpqual((Plan) plan),
- xfunc_clause_compare));
- if (XfuncMode != XFUNC_NOR)
- /* sort the disjuncts within each clause by cost -- JMH 3/4/92 */
- xfunc_disjunct_sort(plan->qpqual);
- }
-#endif
-
return plan;
}
diff --git a/src/backend/optimizer/util/pathnode.c b/src/backend/optimizer/util/pathnode.c
index 895a1329f81..619013a18d5 100644
--- a/src/backend/optimizer/util/pathnode.c
+++ b/src/backend/optimizer/util/pathnode.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/optimizer/util/pathnode.c,v 1.103 2004/03/29 19:58:04 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/optimizer/util/pathnode.c,v 1.104 2004/04/25 18:23:56 neilc Exp $
*
*-------------------------------------------------------------------------
*/
@@ -243,9 +243,9 @@ set_cheapest(RelOptInfo *parent_rel)
* A path is worthy if it has either a better sort order (better pathkeys)
* or cheaper cost (on either dimension) than any of the existing old paths.
*
- * Unless parent_rel->pruneable is false, we also remove from the rel's
- * pathlist any old paths that are dominated by new_path --- that is,
- * new_path is both cheaper and at least as well ordered.
+ * We also remove from the rel's pathlist any old paths that are dominated
+ * by new_path --- that is, new_path is both cheaper and at least as well
+ * ordered.
*
* The pathlist is kept sorted by TOTAL_COST metric, with cheaper paths
* at the front. No code depends on that for correctness; it's simply
@@ -342,10 +342,9 @@ add_path(RelOptInfo *parent_rel, Path *new_path)
}
/*
- * Remove current element from pathlist if dominated by new,
- * unless xfunc told us not to remove any paths.
+ * Remove current element from pathlist if dominated by new.
*/
- if (remove_old && parent_rel->pruneable)
+ if (remove_old)
{
List *p1_next = lnext(p1);
diff --git a/src/backend/optimizer/util/relnode.c b/src/backend/optimizer/util/relnode.c
index d5a5480c62e..d6853ca819d 100644
--- a/src/backend/optimizer/util/relnode.c
+++ b/src/backend/optimizer/util/relnode.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/optimizer/util/relnode.c,v 1.55 2004/02/17 00:52:53 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/optimizer/util/relnode.c,v 1.56 2004/04/25 18:23:56 neilc Exp $
*
*-------------------------------------------------------------------------
*/
@@ -135,7 +135,6 @@ make_base_rel(Query *root, int relid)
rel->cheapest_startup_path = NULL;
rel->cheapest_total_path = NULL;
rel->cheapest_unique_path = NULL;
- rel->pruneable = true;
rel->relid = relid;
rel->rtekind = rte->rtekind;
/* min_attr, max_attr, attr_needed, attr_widths are set below */
@@ -291,7 +290,6 @@ build_join_rel(Query *root,
joinrel->cheapest_startup_path = NULL;
joinrel->cheapest_total_path = NULL;
joinrel->cheapest_unique_path = NULL;
- joinrel->pruneable = true;
joinrel->relid = 0; /* indicates not a baserel */
joinrel->rtekind = RTE_JOIN;
joinrel->min_attr = 0;