diff options
author | Vadim B. Mikheev <vadim4o@yahoo.com> | 1997-04-24 15:49:30 +0000 |
---|---|---|
committer | Vadim B. Mikheev <vadim4o@yahoo.com> | 1997-04-24 15:49:30 +0000 |
commit | 4ec8a148edae37f07c75c95197704744f5fa083d (patch) | |
tree | fd698a0dc249346d88fd37385f0881581d363e2e /src | |
parent | 72b523d05564c3a8b9e0d872227da64ffb5e8130 (diff) | |
download | postgresql-4ec8a148edae37f07c75c95197704744f5fa083d.tar.gz postgresql-4ec8a148edae37f07c75c95197704744f5fa083d.zip |
Add innercost to result in cost_hashjoin.
Diffstat (limited to 'src')
-rw-r--r-- | src/backend/optimizer/path/costsize.c | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/src/backend/optimizer/path/costsize.c b/src/backend/optimizer/path/costsize.c index 06ddda52a9b..f2c4569e855 100644 --- a/src/backend/optimizer/path/costsize.c +++ b/src/backend/optimizer/path/costsize.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/path/costsize.c,v 1.14 1997/04/09 02:13:41 vadim Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/path/costsize.c,v 1.15 1997/04/24 15:49:30 vadim Exp $ * *------------------------------------------------------------------------- */ @@ -321,15 +321,19 @@ cost_hashjoin(Cost outercost, return _disable_cost_; if ( !_enable_hashjoin_ ) temp += _disable_cost_; -/* temp += outercost + (nrun + 1) * innercost; */ - /* - the innercost shouldn't be used it. Instead the - cost of hashing the innerpath should be used - - ASSUME innercost is 1 for now -- a horrible hack - - jolly - */ + /* + temp += outercost + (nrun + 1) * innercost; + * + * the innercost shouldn't be used it. Instead the + * cost of hashing the innerpath should be used + * + * ASSUME innercost is 1 for now -- a horrible hack + * - jolly temp += outercost + (nrun + 1); + * + * But we must add innercost to result. - vadim 04/24/97 + */ + temp += outercost + innercost + (nrun + 1); temp += _cpu_page_wight_ * (outersize + nrun * innersize); Assert(temp >= 0); |