Re: Bad cost estimate with FALSE filter condition

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Josh Berkus <josh(at)agliodbs(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Bad cost estimate with FALSE filter condition
Date: 2015-03-16 18:26:55
Message-ID: 4345.1426530415@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Josh Berkus <josh(at)agliodbs(dot)com> writes:
> So ... should I assume my diagnosis is correct? Haven't heard any other
> suggestions.

I don't see any reason to think this is worth worrying about, or worth
spending planner cycles on to produce a cosmetically nicer cost estimate.
One-time filters always apply at the top plan level so they're unlikely
to change any planner choices. Moreover, for any case other than the
not-terribly-interesting constant FALSE case, we're better off assuming
that the filter condition will be true (and so there's nothing to adjust).

regards, tom lane

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Vivekanand Joshi 2015-03-16 18:32:19 Re: Performance issues
Previous Message Tomas Vondra 2015-03-16 18:24:24 Re: Performance issues