diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2003-01-27 20:51:54 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2003-01-27 20:51:54 +0000 |
commit | 70fba70430bd42b1a31c6d49646f9d1991eb8e7c (patch) | |
tree | 865c11bc1262e1fd48067f9b897abf2a50653ddf /src/backend/optimizer/util/pathnode.c | |
parent | b2773d4099d2dbccc4d23165a093581090c49451 (diff) | |
download | postgresql-70fba70430bd42b1a31c6d49646f9d1991eb8e7c.tar.gz postgresql-70fba70430bd42b1a31c6d49646f9d1991eb8e7c.zip |
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/backend/optimizer/util/pathnode.c')
-rw-r--r-- | src/backend/optimizer/util/pathnode.c | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/src/backend/optimizer/util/pathnode.c b/src/backend/optimizer/util/pathnode.c index 3e8d37cb289..c11b928b861 100644 --- a/src/backend/optimizer/util/pathnode.c +++ b/src/backend/optimizer/util/pathnode.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/util/pathnode.c,v 1.85 2003/01/22 00:07:00 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/util/pathnode.c,v 1.86 2003/01/27 20:51:54 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -743,8 +743,7 @@ create_nestloop_path(Query *root, pathnode->joinrestrictinfo = restrict_clauses; pathnode->path.pathkeys = pathkeys; - cost_nestloop(&pathnode->path, root, outer_path, inner_path, - restrict_clauses); + cost_nestloop(pathnode, root); return pathnode; } @@ -816,14 +815,7 @@ create_mergejoin_path(Query *root, pathnode->outersortkeys = outersortkeys; pathnode->innersortkeys = innersortkeys; - cost_mergejoin(&pathnode->jpath.path, - root, - outer_path, - inner_path, - restrict_clauses, - mergeclauses, - outersortkeys, - innersortkeys); + cost_mergejoin(pathnode, root); return pathnode; } @@ -861,12 +853,7 @@ create_hashjoin_path(Query *root, pathnode->jpath.path.pathkeys = NIL; pathnode->path_hashclauses = hashclauses; - cost_hashjoin(&pathnode->jpath.path, - root, - outer_path, - inner_path, - restrict_clauses, - hashclauses); + cost_hashjoin(pathnode, root); return pathnode; } |