diff options
| author | Tom Lane | 2003-01-27 20:51:54 +0000 |
|---|---|---|
| committer | Tom Lane | 2003-01-27 20:51:54 +0000 |
| commit | 70fba70430bd42b1a31c6d49646f9d1991eb8e7c (patch) | |
| tree | 865c11bc1262e1fd48067f9b897abf2a50653ddf /src/include | |
| parent | b2773d4099d2dbccc4d23165a093581090c49451 (diff) | |
Upgrade cost estimation for joins, per discussion with Bradley Baetz.
Try to model the effect of rescanning input tuples in mergejoins;
account for JOIN_IN short-circuiting where appropriate. Also, recognize
that mergejoin and hashjoin clauses may now be more than single operator
calls, so we have to charge appropriate execution costs.
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/nodes/pg_list.h | 3 | ||||
| -rw-r--r-- | src/include/optimizer/cost.h | 17 |
2 files changed, 6 insertions, 14 deletions
diff --git a/src/include/nodes/pg_list.h b/src/include/nodes/pg_list.h index 56a66409161..d629cd49e6c 100644 --- a/src/include/nodes/pg_list.h +++ b/src/include/nodes/pg_list.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: pg_list.h,v 1.32 2003/01/24 03:58:43 tgl Exp $ + * $Id: pg_list.h,v 1.33 2003/01/27 20:51:54 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -138,6 +138,7 @@ extern void set_nth(List *l, int n, void *elem); extern List *set_difference(List *list1, List *list2); extern List *set_differencei(List *list1, List *list2); +extern List *set_ptrDifference(List *list1, List *list2); extern List *lreverse(List *l); extern List *set_union(List *list1, List *list2); extern List *set_unioni(List *list1, List *list2); diff --git a/src/include/optimizer/cost.h b/src/include/optimizer/cost.h index b5fef65c5dc..aca6097bc1c 100644 --- a/src/include/optimizer/cost.h +++ b/src/include/optimizer/cost.h @@ -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.50 2003/01/12 22:35:29 tgl Exp $ + * $Id: cost.h,v 1.51 2003/01/27 20:51:54 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -71,18 +71,9 @@ extern void cost_group(Path *path, Query *root, int numGroupCols, double numGroups, Cost input_startup_cost, Cost input_total_cost, double input_tuples); -extern void cost_nestloop(Path *path, Query *root, - Path *outer_path, Path *inner_path, - List *restrictlist); -extern void cost_mergejoin(Path *path, Query *root, - Path *outer_path, Path *inner_path, - List *restrictlist, - List *mergeclauses, - List *outersortkeys, List *innersortkeys); -extern void cost_hashjoin(Path *path, Query *root, - Path *outer_path, Path *inner_path, - List *restrictlist, - List *hashclauses); +extern void cost_nestloop(NestPath *path, Query *root); +extern void cost_mergejoin(MergePath *path, Query *root); +extern void cost_hashjoin(HashPath *path, Query *root); extern void cost_qual_eval(QualCost *cost, List *quals); extern void set_baserel_size_estimates(Query *root, RelOptInfo *rel); extern void set_joinrel_size_estimates(Query *root, RelOptInfo *rel, |
