From 7c579fa12df0def35192e1e3cfc9ea7ab90bb0cb Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Tue, 5 Jun 2001 05:26:05 +0000 Subject: Further work on making use of new statistics in planner. Adjust APIs of costsize.c routines to pass Query root, so that costsize can figure more things out by itself and not be so dependent on its callers to tell it everything it needs to know. Use selectivity of hash or merge clause to estimate number of tuples processed internally in these joins (this is more useful than it would've been before, since eqjoinsel is somewhat more accurate than before). --- src/backend/optimizer/plan/planmain.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/backend/optimizer/plan/planmain.c') diff --git a/src/backend/optimizer/plan/planmain.c b/src/backend/optimizer/plan/planmain.c index 2f52e694d13..b5a77ea6232 100644 --- a/src/backend/optimizer/plan/planmain.c +++ b/src/backend/optimizer/plan/planmain.c @@ -14,7 +14,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/plan/planmain.c,v 1.65 2001/05/20 20:28:19 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/plan/planmain.c,v 1.66 2001/06/05 05:26:04 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -317,7 +317,7 @@ subplanner(Query *root, { Path sort_path; /* dummy for result of cost_sort */ - cost_sort(&sort_path, root->query_pathkeys, + cost_sort(&sort_path, root, root->query_pathkeys, final_rel->rows, final_rel->width); sort_path.startup_cost += cheapestpath->total_cost; sort_path.total_cost += cheapestpath->total_cost; -- cgit v1.2.3