Re: [GENERAL] Planner statistics usage for composite type - Mailing list pgsql-general

From Stephen Frost
Subject Re: [GENERAL] Planner statistics usage for composite type
Date
Msg-id 20170719155453.GU1769@tamriel.snowman.net
Whole thread Raw
In response to Re: [GENERAL] Planner statistics usage for composite type  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [GENERAL] Planner statistics usage for composite type
List pgsql-general
Tom,

* Tom Lane (tgl@sss.pgh.pa.us) wrote:
> Dmitry Lazurkin <dilaz03@gmail.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

Attachment

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: [GENERAL] Planner statistics usage for composite type
Next
From: Tom Lane
Date:
Subject: Re: [GENERAL] Planner statistics usage for composite type