Re: WIP: avoiding tuple construction/deconstruction overhead - Mailing list pgsql-patches

From a_ogawa
Subject Re: WIP: avoiding tuple construction/deconstruction overhead
Date
Msg-id PIEMIKOOMKNIJLLLBCBBOEHBCFAA.a_ogawa@hi-ho.ne.jp
Whole thread Raw
In response to WIP: avoiding tuple construction/deconstruction overhead  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: WIP: avoiding tuple construction/deconstruction overhead
List pgsql-patches
Tom Lane wrote:
> Attached is the current state of a patch to reduce the overhead of
> passing tuple data up through many levels of plan nodes.

It is a good idea.
I think that this patch improves performance of the whole executor.

I have three comments.

(1)We can improve compare_heap() by using TableTupleSlot instead of
HeapTuple. Please see attached patch.

(2)In ExecStoreTuple(), we can omit initialization of slot->tts_nvalid.
If slot->tts_isempty is false, tts_nvalid is initialized by
ExecClearTuple(). If it is true, tts_nvalid is always zero.

(3)There is a description of slot->val in comment of execTuple.c.
This had better revise it.

> Finally, I have made some progress towards making the tuple access
> routines consistently use "bool isNull" arrays as null markers, instead
> of the char 'n' or ' ' convention that was previously used in some but
> not all contexts.

I agree. I think that this progress improves readability.

regards,

--- Atsushi Ogawa

Attachment

pgsql-patches by date:

Previous
From: Karel Zak
Date:
Subject: Re: [BUGS] CC Date format code defaults to current centry
Next
From: Tom Lane
Date:
Subject: Re: WIP: avoiding tuple construction/deconstruction overhead