David Rowley <dgrowle...@gmail.com> writes:
> Any opinions on this?

This patch scares the heck out of me.  It's a pretty much unprincipled
change in a fundamental selectivity estimator, which is going to affect
all sorts of queries not only the particular case you have in mind.
There's no reason to think that the outcome will be positive for other
cases, either.

The idea I'd had was to adjust make_subplan and cost_subplan to estimate
EXIST cases on the basis of either 50% retrieval (same as ANY/ALL) or
maybe full retrieval if you want to be pessimistic.  I've not had time
to try it out though.

                        regards, tom lane


Reply via email to