diff options
| author | Tom Lane | 2000-01-23 02:07:00 +0000 |
|---|---|---|
| committer | Tom Lane | 2000-01-23 02:07:00 +0000 |
| commit | 8449df8a67864b5009fa078cf21884461f4ed4e6 (patch) | |
| tree | 5491283b3cf5e817f755cb20b8a9abe5ad64006b /src/include/optimizer | |
| parent | 49581f9848a22affbfc7ca48719ead843837215e (diff) | |
First cut at unifying regular selectivity estimation with indexscan
selectivity estimation wasn't right. This is better...
Diffstat (limited to 'src/include/optimizer')
| -rw-r--r-- | src/include/optimizer/cost.h | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/src/include/optimizer/cost.h b/src/include/optimizer/cost.h index 9c16fc8fea6..fd6daee1b1f 100644 --- a/src/include/optimizer/cost.h +++ b/src/include/optimizer/cost.h @@ -6,7 +6,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: cost.h,v 1.26 2000/01/22 23:50:26 tgl Exp $ + * $Id: cost.h,v 1.27 2000/01/23 02:06:57 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -15,15 +15,16 @@ #include "nodes/relation.h" +/* defaults for costsize.c's Cost parameters */ +/* NB: cost-estimation code should use the variables, not the constants! */ +#define CPU_PAGE_WEIGHT 0.033 +#define CPU_INDEX_PAGE_WEIGHT 0.017 + /* defaults for function attributes used for expensive function calculations */ #define BYTE_PCT 100 #define PERBYTE_CPU 0 #define PERCALL_CPU 0 #define OUTIN_RATIO 100 -/* defaults for costsize.c's Cost parameters */ -/* NB: cost-estimation code should use the variables, not the constants! */ -#define CPU_PAGE_WEIGHT 0.033 -#define CPU_INDEX_PAGE_WEIGHT 0.017 /* @@ -61,8 +62,14 @@ extern void set_joinrel_rows_width(Query *root, RelOptInfo *rel, * prototypes for clausesel.c * routines to compute clause selectivities */ -extern Selectivity restrictlist_selec(Query *root, List *restrictinfo_list); -extern Selectivity clauselist_selec(Query *root, List *clauses); -extern Selectivity compute_clause_selec(Query *root, Node *clause); +extern Selectivity restrictlist_selectivity(Query *root, + List *restrictinfo_list, + int varRelid); +extern Selectivity clauselist_selectivity(Query *root, + List *clauses, + int varRelid); +extern Selectivity clause_selectivity(Query *root, + Node *clause, + int varRelid); #endif /* COST_H */ |
