Re: Proposal: scan key push down to heap [WIP] - Mailing list pgsql-hackers

From Dilip Kumar
Subject Re: Proposal: scan key push down to heap [WIP]
Date
Msg-id CAFiTN-vB4A04o3wjHMK=5bHUcWkfe3J1uhZrYS7jDi611Lm0-A@mail.gmail.com
Whole thread Raw
In response to Re: Proposal: scan key push down to heap [WIP]  (Andres Freund <andres@anarazel.de>)
Responses Re: Proposal: scan key push down to heap [WIP]  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
On Fri, Dec 2, 2016 at 3:11 AM, Andres Freund <andres@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



pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: patch: function xmltable
Next
From: Tom Lane
Date:
Subject: Re: [COMMITTERS] pgsql: Add max_parallel_workers GUC.