mirror of
https://github.com/postgres/postgres.git
synced 2025-10-27 00:12:01 +03:00
First cut at unifying regular selectivity estimation with indexscan
selectivity estimation wasn't right. This is better...
This commit is contained in:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user