Allan Wang <[EMAIL PROTECTED]> writes: > It seems that Postgres is estimating that all rows in a 50k row table > will be returned, but only one should match.
I think this is the same issue fixed here: 2005-04-03 21:43 tgl * src/backend/optimizer/path/: costsize.c (REL7_4_STABLE), costsize.c (REL8_0_STABLE), costsize.c: In cost_mergejoin, the early-exit effect should not apply to the outer side of an outer join. Per [EMAIL PROTECTED] Are you running 7.4.8 or 8.0.2 or later? regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 6: Have you searched our list archives? http://archives.postgresql.org