From 3d09f6c5609da36270c77b24f87313eac94a7635 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Mon, 14 Jul 2003 22:35:54 +0000 Subject: Make cost estimates for SubqueryScan more realistic: charge cpu_tuple_cost for each row processed, and don't forget the evaluation cost of any restriction clauses attached to the node. Per discussion with Greg Stark. --- src/backend/optimizer/util/pathnode.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/backend/optimizer/util/pathnode.c') diff --git a/src/backend/optimizer/util/pathnode.c b/src/backend/optimizer/util/pathnode.c index 9e919079ccf..19198bf2494 100644 --- a/src/backend/optimizer/util/pathnode.c +++ b/src/backend/optimizer/util/pathnode.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/util/pathnode.c,v 1.91 2003/06/29 23:05:04 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/util/pathnode.c,v 1.92 2003/07/14 22:35:54 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -686,9 +686,7 @@ create_subqueryscan_path(RelOptInfo *rel, List *pathkeys) pathnode->parent = rel; pathnode->pathkeys = pathkeys; - /* just copy the subplan's cost estimates */ - pathnode->startup_cost = rel->subplan->startup_cost; - pathnode->total_cost = rel->subplan->total_cost; + cost_subqueryscan(pathnode, rel); return pathnode; } -- cgit v1.2.3