1
0
mirror of https://github.com/postgres/postgres.git synced 2025-10-27 00:12:01 +03:00

Extend join-selectivity API (oprjoin interface) so that join type is

passed to join selectivity estimators.  Make use of this in eqjoinsel
to derive non-bogus selectivity for IN clauses.  Further tweaking of
cost estimation for IN.
initdb forced because of pg_proc.h changes.
This commit is contained in:
Tom Lane
2003-01-28 22:13:41 +00:00
parent 955a1f81a7
commit 2e46b762eb
16 changed files with 222 additions and 137 deletions

View File

@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $Id: cost.h,v 1.51 2003/01/27 20:51:54 tgl Exp $
* $Id: cost.h,v 1.52 2003/01/28 22:13:41 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -88,13 +88,16 @@ extern void set_function_size_estimates(Query *root, RelOptInfo *rel);
* routines to compute clause selectivities
*/
extern Selectivity restrictlist_selectivity(Query *root,
List *restrictinfo_list,
int varRelid);
List *restrictinfo_list,
int varRelid,
JoinType jointype);
extern Selectivity clauselist_selectivity(Query *root,
List *clauses,
int varRelid);
List *clauses,
int varRelid,
JoinType jointype);
extern Selectivity clause_selectivity(Query *root,
Node *clause,
int varRelid);
Node *clause,
int varRelid,
JoinType jointype);
#endif /* COST_H */

View File

@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $Id: plancat.h,v 1.27 2002/06/20 20:29:51 momjian Exp $
* $Id: plancat.h,v 1.28 2003/01/28 22:13:41 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -34,7 +34,8 @@ extern Selectivity restriction_selectivity(Query *root,
int varRelid);
extern Selectivity join_selectivity(Query *root,
Oid operator,
List *args);
Oid operator,
List *args,
JoinType jointype);
#endif /* PLANCAT_H */