Re: [GENERAL] Planner statistics usage for composite type

2017-07-20 Thread Dmitry Lazurkin
On 07/19/2017 06:37 PM, Tom Lane wrote: > Dmitry Lazurkin 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 >>

[GENERAL] Planner statistics usage for composite type

2017-07-19 Thread dilaz03 .
Hello. I am trying to find workaround for cross-column statistics. For example, I have tags with similarity: select version(); version

Re: [GENERAL] Planner statistics usage for composite type

2017-07-19 Thread Tom Lane
Stephen Frost writes: > * Tom Lane (t...@sss.pgh.pa.us) wrote: >> 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 >>

Re: [GENERAL] Planner statistics usage for composite type

2017-07-19 Thread Stephen Frost
Tom, * Tom Lane (t...@sss.pgh.pa.us) wrote: > Dmitry Lazurkin 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

Re: [GENERAL] Planner statistics usage for composite type

2017-07-19 Thread Tom Lane
Dmitry Lazurkin 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,

[GENERAL] Planner statistics usage for composite type

2017-07-19 Thread Dmitry Lazurkin
Hello. I am trying to find workaround for cross-column statistics. For example, I have tags with similarity: select version(); version