On 16/2/2024 19:54, jian he wrote: > After setting these parameters, overall enable_or_transformation ON is > performance better. > sorry for the noise. Don't worry, at least we know a weak point of partial paths estimation. > so now I didn't find any corner case where enable_or_transformation is > ON peforms worse than when it's OFF. > > +typedef struct OrClauseGroupEntry > +{ > + OrClauseGroupKey key; > + > + Node *node; > + List *consts; > + Oid scalar_type; > + List *exprs; > +} OrClauseGroupEntry; > > I found that the field `scalar_type` was never used. Thanks, fixed.
Not that it will make a big difference, but it would be good to avoid, I think.
v17-0002
1) move the vars *arrayconst and *dest, to after if, to avoid makeNode (palloc).
+ Const *arrayconst; + ScalarArrayOpExpr *dest; + + pd = (PredicatesData *) lfirst(lc); + if (pd->elems == NIL) + /* The index doesn't participate in this operation */ + continue;
+ arrayconst = lsecond_node(Const, saop->args); + dest = makeNode(ScalarArrayOpExpr);