Remove cost_hashjoin's very ancient hack to discourage (once, entirely forbid)
authorTom Lane <tgl@sss.pgh.pa.us>
Mon, 8 Jan 2007 16:09:31 +0000 (16:09 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Mon, 8 Jan 2007 16:09:31 +0000 (16:09 +0000)
commit9c1443e66fa30357365ab2225ff6543721641eb8
tree912b7c876d65ae09108b2b9d056011e32d01e3d8
parent2054724c085b354f83d59611b62b47b641226e59
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.
src/backend/optimizer/path/costsize.c