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

From Robert Haas
Subject Re: Proposal: scan key push down to heap [WIP]
Date
Msg-id CA+Tgmoaq3QoO3qC5+h=nXJOLHkuiyr8b47LWpF4L_ETPFWVhfQ@mail.gmail.com
Whole thread Raw
In response to Re: Proposal: scan key push down to heap [WIP]  (Dilip Kumar <dilipbalaut@gmail.com>)
Responses Re: Proposal: scan key push down to heap [WIP]  (Dilip Kumar <dilipbalaut@gmail.com>)
List pgsql-hackers
On Sun, Nov 13, 2016 at 12:16 AM, Dilip Kumar <dilipbalaut@gmail.com> wrote:
> Problem1:  As Andres has mentioned, HeapKeyTest uses heap_getattr,
> whereas ExecQual use slot_getattr().So we can have worst case
> performance problem when very less tuple are getting filter out and we
> have table with many columns with qual on most of the columns.
>
> Problem2. In HeapKeyTest we are under per_query_ctx, whereas in
> ExecQual we are under per_tuple_ctx , so in former we can not afford
> to have any palloc.

Couldn't we just change the current memory context before calling
heap_getnext()?  And then change back?

Also, what if we abandoned the idea of pushing qual evaluation all the
way down into the heap and just tried to do HeapKeyTest in SeqNext
itself?  Would that be almost as fast, or would it give up most of the
benefits?

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Proposal for changes to recovery.conf API
Next
From: Dilip Kumar
Date:
Subject: Re: Proposal: scan key push down to heap [WIP]