On Fri, 2007-02-09 at 11:46 -0500, Tom Lane wrote:
> "Jim Nasby" <[EMAIL PROTECTED]> writes:
> > IF I run the following with the a < 2900 condition first, the more
> > expensive EXISTS only gets executed when needed, but if I change the
> > order of the OR's, the EXISTS is always executed. It w
On Feb 9, 2007, at 10:46 AM, Tom Lane wrote:
"Jim Nasby" <[EMAIL PROTECTED]> writes:
IF I run the following with the a < 2900 condition first, the more
expensive EXISTS only gets executed when needed, but if I change the
order of the OR's, the EXISTS is always executed. It would be good if
the o
"Jim Nasby" <[EMAIL PROTECTED]> writes:
> IF I run the following with the a < 2900 condition first, the more
> expensive EXISTS only gets executed when needed, but if I change the
> order of the OR's, the EXISTS is always executed. It would be good if
> the optimizer could re-order the OR con
IF I run the following with the a < 2900 condition first, the more
expensive EXISTS only gets executed when needed, but if I change the
order of the OR's, the EXISTS is always executed. It would be good if
the optimizer could re-order the OR conditions based on estimated
cost (granted, this