Skip site navigation (1) Skip section navigation (2)

pgsql: Remove cost_hashjoin's very ancient hack to discourage (once,

From: tgl(at)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Remove cost_hashjoin's very ancient hack to discourage (once,
Date: 2007-01-08 16:09:22
Message-ID: 20070108160922.930A19FB21D@postgresql.org (view raw or flat)
Thread:
Lists: pgsql-committers
Log Message:
-----------
Remove cost_hashjoin's very ancient hack to discourage (once, entirely forbid)
hash joins with the estimated-larger relation on the inside.  There are
several cases where doing that makes perfect sense, and in cases where it
doesn't, the regular cost computation really ought to be able to figure that
out.  Make some marginal tweaks in said computation to try to get results
approximating reality a bit better.  Per an example from Shane Ambler.

Also, fix an oversight in the original patch to add seq_page_cost: the costs
of spilling a hash join to disk should be scaled by seq_page_cost.

Modified Files:
--------------
    pgsql/src/backend/optimizer/path:
        costsize.c (r1.172 -> r1.173)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/path/costsize.c.diff?r1=1.172&r2=1.173)

pgsql-committers by date

Next:From: Tom LaneDate: 2007-01-08 16:09:31
Subject: pgsql: Remove cost_hashjoin's very ancient hack to discourage (once,
Previous:From: Jeremy DrakeDate: 2007-01-08 05:04:09
Subject: Re: pgsql: Widen the money type to 64 bits.

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group