From 8449df8a67864b5009fa078cf21884461f4ed4e6 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Sun, 23 Jan 2000 02:07:00 +0000 Subject: First cut at unifying regular selectivity estimation with indexscan selectivity estimation wasn't right. This is better... --- src/include/optimizer/cost.h | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) (limited to 'src/include/optimizer') 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 */ -- cgit v1.2.3