diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2003-07-14 22:35:54 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2003-07-14 22:35:54 +0000 |
commit | 3d09f6c5609da36270c77b24f87313eac94a7635 (patch) | |
tree | 7405aa50f97c4e0ab57c98bfe98e5755c771f029 /src/backend/optimizer/util/pathnode.c | |
parent | b800196230c7eca35d781df39cf3a4b739c86300 (diff) | |
download | postgresql-3d09f6c5609da36270c77b24f87313eac94a7635.tar.gz postgresql-3d09f6c5609da36270c77b24f87313eac94a7635.zip |
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.
Diffstat (limited to 'src/backend/optimizer/util/pathnode.c')
-rw-r--r-- | src/backend/optimizer/util/pathnode.c | 6 |
1 files changed, 2 insertions, 4 deletions
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; } |