"Steinar H. Gunderson" <[EMAIL PROTECTED]> writes: > It looks like the estimated cost is lower for 8.2.4 -- could it be that the > fact that he's giving it more memory lead to the planner picking a plan that > happens to be worse?
Offhand I don't think so. More work_mem might make a hash join look cheaper (or a sort for a mergejoin), but the problem here seems to be that it's switching away from a hash and to a nestloop. Which is a loser because there are many more outer-relation rows than it's expecting. regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 7: You can help support the PostgreSQL project by donating at http://www.postgresql.org/about/donate