summaryrefslogtreecommitdiff
path: root/src/include/nodes/relation.h
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2001-06-05 05:26:05 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2001-06-05 05:26:05 +0000
commit7c579fa12df0def35192e1e3cfc9ea7ab90bb0cb (patch)
tree70886176df00ac556e7992fde6e2ffd7c90530f9 /src/include/nodes/relation.h
parent28d2420eefdacfa928138d4b302fd6a31286225b (diff)
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).
Diffstat (limited to 'src/include/nodes/relation.h')
-rw-r--r--src/include/nodes/relation.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/include/nodes/relation.h b/src/include/nodes/relation.h
index 33927edc18d..4b47a84db5f 100644
--- a/src/include/nodes/relation.h
+++ b/src/include/nodes/relation.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: relation.h,v 1.56 2001/05/20 20:28:20 tgl Exp $
+ * $Id: relation.h,v 1.57 2001/06/05 05:26:05 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -492,7 +492,7 @@ typedef struct HashPath
* path is responsible for identifying the restrict clauses it can use
* and ignoring the rest. Clauses not implemented by an indexscan,
* mergejoin, or hashjoin will be placed in the plan qual or joinqual field
- * of the final Plan node, where they will be enforced by general-purpose
+ * of the finished Plan node, where they will be enforced by general-purpose
* qual-expression-evaluation code. (But we are still entitled to count
* their selectivity when estimating the result tuple count, if we
* can guess what it is...)
@@ -504,14 +504,16 @@ typedef struct RestrictInfo
Expr *clause; /* the represented clause of WHERE or JOIN */
- Cost eval_cost; /* eval cost of clause; -1 if not yet set */
-
bool ispusheddown; /* TRUE if clause was pushed down in level */
/* only used if clause is an OR clause: */
List *subclauseindices; /* indexes matching subclauses */
/* subclauseindices is a List of Lists of IndexOptInfos */
+ /* cache space for costs (currently only used for join clauses) */
+ Cost eval_cost; /* eval cost of clause; -1 if not yet set */
+ Selectivity this_selec; /* selectivity; -1 if not yet set */
+
/* valid if clause is mergejoinable, else InvalidOid: */
Oid mergejoinoperator; /* copy of clause operator */
Oid left_sortop; /* leftside sortop needed for mergejoin */