Re: Introducing floating point cast into filter drastically changes row estimate

From: Merlin Moncure <mmoncure(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-bugs <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: Introducing floating point cast into filter drastically changes row estimate
Date: 2012-10-24 20:51:56
Message-ID: CAHyXU0yLQpshj5mgF_2zzjyKqmrniMqhzrbpBd7SZ1MD2UO=dQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Wed, Oct 24, 2012 at 3:33 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Merlin Moncure <mmoncure(at)gmail(dot)com> writes:
>> Yeah -- I have a case where a large number of joins are happening that
>> have a lot of filtering based on expressions and things like that.
>
> Might be worth your while to install some indexes on those expressions,
> if only to trigger collection of stats about them.

Not practical -- these expressions are all about 'outlier culling'.
It's just wasteful to materialize indexes for stastical purposes only.
Anyways, in this case, I just refactored the query into a CTE.

Hm -- what if you could flag a table dependent expression for being
interesting for statistics? Or what about planner hints for boolean
expressions (ducks) ... 'likely(boolexpr)'?

merlin

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Merlin Moncure 2012-10-24 22:40:36 Re: Introducing floating point cast into filter drastically changes row estimate
Previous Message Tom Lane 2012-10-24 20:33:00 Re: Introducing floating point cast into filter drastically changes row estimate