summaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2003-01-12 22:35:29 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2003-01-12 22:35:29 +0000
commitd4ce5a4f4c3516e88fa34c53bcc7313db90a3c08 (patch)
tree4c6b53e1c1e0989a9f45fe42ab6f29ffac019c03 /doc/src
parentd51260aa9d36653f4d63e6df133ddff8380f61b2 (diff)
Revise cost_qual_eval() to compute both startup (one-time) and per-tuple
costs for expression evaluation, not only per-tuple cost as before. This extension is needed in order to deal realistically with hashed or materialized sub-selects.
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/indexcost.sgml7
1 files changed, 4 insertions, 3 deletions
diff --git a/doc/src/sgml/indexcost.sgml b/doc/src/sgml/indexcost.sgml
index 63cf8daf22d..2e62280a8be 100644
--- a/doc/src/sgml/indexcost.sgml
+++ b/doc/src/sgml/indexcost.sgml
@@ -1,5 +1,5 @@
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/Attic/indexcost.sgml,v 2.12 2002/08/22 00:01:40 tgl Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/Attic/indexcost.sgml,v 2.13 2003/01/12 22:35:29 tgl Exp $
-->
<chapter id="indexcost">
@@ -237,9 +237,10 @@ amcostestimate (Query *root,
* Also, we charge for evaluation of the indexquals at each index tuple.
* All the costs are assumed to be paid incrementally during the scan.
*/
- *indexStartupCost = 0;
+ cost_qual_eval(&index_qual_cost, indexQuals);
+ *indexStartupCost = index_qual_cost.startup;
*indexTotalCost = numIndexPages +
- (cpu_index_tuple_cost + cost_qual_eval(indexQuals)) * numIndexTuples;
+ (cpu_index_tuple_cost + index_qual_cost.per_tuple) * numIndexTuples;
</programlisting>
</para>
</step>