Re: Planner statistics usage for composite type

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Dmitry Lazurkin <dilaz03(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Planner statistics usage for composite type
Date: 2017-07-19 15:54:53
Message-ID: 20170719155453.GU1769@tamriel.snowman.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Tom,

* Tom Lane (tgl(at)sss(dot)pgh(dot)pa(dot)us) wrote:
> Dmitry Lazurkin <dilaz03(at)gmail(dot)com> writes:
> > I am trying to find workaround for cross-column statistics.
> > ...
> > Worn estimate. Planner doesn't use statistics. In code I see usage of
> > function scalargtsel which returns default selectivity because
> > ROW('tag1', 0.9)::tag_sim is not Const.
>
> Yeah, that's because eval_const_expressions doesn't know how to fold
> a constant RowExpr to a simple Const. I have a patch laying about
> someplace to improve that, but I keep forgetting about it until
> we're in beta phase :-(. In the meantime you could perhaps do the
> folding by hand:

Put it into the CF..?

Thanks!

Stephen

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2017-07-19 16:18:07 Re: Planner statistics usage for composite type
Previous Message Tom Lane 2017-07-19 15:37:48 Re: Planner statistics usage for composite type