Bruno Wolff III <bruno@wolff.to> writes:
> Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Can anyone suggest a more general rule?
> I think it makes sense to guess that a smaller fraction of the rows will
> be returned when a column value is bounded above and below than if it
> is only bounded on one side, even if the bounds aren't fixed. You can
> certainly be wrong.
Yeah, the whole thing is only a heuristic anyway. I've been coming
around to the view that relation membership shouldn't matter, because
of cases like
WHERE a.x > b.y AND a.x < 42
which surely should be taken as a range constraint.
regards, tom lane