Re: track needed attributes in plan nodes for executor use

2025-07-15 Thread Amit Langote
Thanks for the thoughts, Tom. On Mon, Jul 14, 2025 at 11:29 PM Tom Lane wrote: > Amit Langote writes: > > Not quite -- the optimization doesn’t require changes to the tuple > > header or representation. The existing deforming code already stops > > once all requested attributes are filled, using

Re: track needed attributes in plan nodes for executor use

2025-07-14 Thread Tom Lane
Amit Langote writes: > Not quite -- the optimization doesn’t require changes to the tuple > header or representation. The existing deforming code already stops > once all requested attributes are filled, using tts_nvalid to track > that. What I’m proposing is to additionally allow the slot to skip

Re: track needed attributes in plan nodes for executor use

2025-07-14 Thread Andrei Lepikhov
On 14/7/2025 06:52, Amit Langote wrote: On Fri, Jul 11, 2025 at 11:09 PM Andrei Lepikhov wrote: To support that efficiently, the slot can store a new tts_min_valid field to indicate the lowest attno that needs deforming. Alternatively, we could use a per-attribute flag array (with TupleDesc->nat

Re: track needed attributes in plan nodes for executor use

2025-07-13 Thread Amit Langote
Thanks for the comments. On Fri, Jul 11, 2025 at 11:09 PM Andrei Lepikhov wrote: > > On 11/7/2025 10:16, Amit Langote wrote: > > Hi, > > > > I’ve been experimenting with an optimization that reduces executor > > overhead by avoiding unnecessary attribute deformation. Specifically, > > if the exec

Re: track needed attributes in plan nodes for executor use

2025-07-13 Thread Amit Langote
On Fri, Jul 11, 2025 at 6:58 PM Japin Li wrote: > On Fri, 11 Jul 2025 at 17:16, Amit Langote wrote: > > Hi, > > > > I’ve been experimenting with an optimization that reduces executor > > overhead by avoiding unnecessary attribute deformation. Specifically, > > if the executor knows which attribut

Re: track needed attributes in plan nodes for executor use

2025-07-11 Thread Andrei Lepikhov
On 11/7/2025 10:16, Amit Langote wrote: Hi, I’ve been experimenting with an optimization that reduces executor overhead by avoiding unnecessary attribute deformation. Specifically, if the executor knows which attributes are actually needed by a plan node’s targetlist and qual, it can skip deform

Re: track needed attributes in plan nodes for executor use

2025-07-11 Thread Japin Li
On Fri, 11 Jul 2025 at 17:16, Amit Langote wrote: > Hi, > > I’ve been experimenting with an optimization that reduces executor > overhead by avoiding unnecessary attribute deformation. Specifically, > if the executor knows which attributes are actually needed by a plan > node’s targetlist and qual

track needed attributes in plan nodes for executor use

2025-07-11 Thread Amit Langote
Hi, I’ve been experimenting with an optimization that reduces executor overhead by avoiding unnecessary attribute deformation. Specifically, if the executor knows which attributes are actually needed by a plan node’s targetlist and qual, it can skip deforming unused columns entirely. In a proof-o