Skip site navigation (1) Skip section navigation (2)

Re: WIP: avoiding tuple construction/deconstruction overhead

From: a_ogawa <a_ogawa(at)hi-ho(dot)ne(dot)jp>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: WIP: avoiding tuple construction/deconstruction overhead
Date: 2005-03-17 14:20:18
Message-ID: (view raw, whole thread or download thread mbox)
Lists: 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.


--- Atsushi Ogawa

Attachment: compare_heap.patch
Description: application/octet-stream (3.0 KB)


pgsql-patches by date

Next:From: Tom LaneDate: 2005-03-17 14:51:50
Subject: Re: WIP: avoiding tuple construction/deconstruction overhead
Previous:From: Karel ZakDate: 2005-03-17 09:50:51
Subject: Re: [BUGS] CC Date format code defaults to current centry

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group