Andres Freund <and...@anarazel.de> writes: > Whats your opinion on this?
Looks pretty bogus to me. You're essentially assuming that the side of the join without statistics is unique, which is a mighty dubious assumption. (In cases where we *know* it's unique, something like this could be reasonable, but I believe get_variable_numdistinct already accounts for such cases.) The reason for the reversion to pre-8.4 behavior was that with the other behavior, we might sometimes make extremely optimistic estimates (ie, conclude that the join result is very small) on the basis of, really, nothing at all. AFAICS this proposal just reintroduces unwarranted assumptions, and therefore will probably produce as many worse results as better ones. Also, why the asymmetry in null handling? And why did you only touch one of the two code paths in eqjoinsel_semi? They have both got this issue of how to estimate with inadequate stats. regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs