On Fri, Dec 2, 2016 at 3:11 AM, Andres Freund <and...@anarazel.de> wrote: > Hm. I'm more than a bit doubful about this approach. Shouldn't we just > *always* do this as part of expression evaluation, instead of > special-casing for seqscans?
That make sense, we can actually do this as part of expression evaluation and we can cover more cases. > > I.e. during planning recognize that an OpExpr can be evaluated as a > scankey and then emit different qual evaluation instructions? Because > then the benefit can be everywhere, instead of just seqscans. I will experiment with this.. > > I'll post my new expression evaluation stuff - which doesn't do this > atm, but makes ExecQual faster in other ways - later this week. If we > could get the planner (or parse-analysis?) to set an OpExpr flag that > signals that the expression can be evaluated as a scankey, that'd be > easy. Isn't it better to directly make two separate lists during planning itself, one for regular qual and other which can be converted to scankey. Instead of keeping the flag in OpExpr ? -- Regards, Dilip Kumar EnterpriseDB: http://www.enterprisedb.com -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers