Re: [HACKERS] WIP: Faster Expression Processing v4

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: [HACKERS] WIP: Faster Expression Processing v4
Дата
Msg-id 20170324010019.kbcpxg4dceunihg4@alap3.anarazel.de
обсуждение исходный текст
Ответ на Re: [HACKERS] WIP: Faster Expression Processing v4  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On 2017-03-23 20:36:32 -0400, Tom Lane wrote:
> So I think that we have got to fix ExecEvalWholeRowVar so that it doesn't
> clobber the state of the slot.  Right at the moment, the only way to do
> that seems to be to do this instead of ExecFetchSlotTupleDatum:
> 
>     tuple = ExecCopySlotTuple(slot);
>     dtuple = (HeapTupleHeader)
>         DatumGetPointer(heap_copy_tuple_as_datum(tuple,
>                                                  slot->tts_tupleDescriptor));
>     heap_freetuple(tuple);

Hm.  One disadvantage would be that repeated whole-row references to the
same table would be a bit slower, because we'd repeatedly form a tuple
from a virtual one - but I have a hard time coming up with a scenario
where that'd matter.  I'd suspect that in the end it'd probably even
have a *positive* performance impact, because right now the next scalar
access will have to deform the whole tuple again, and that seems like a
lot more likely scenario.

Greetings,

Andres Freund



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Amit Langote
Дата:
Сообщение: Re: [HACKERS] Partitioned tables and relfilenode
Следующее
От: Andres Freund
Дата:
Сообщение: Re: [HACKERS] No more libedit?! - openssl plans to switch to APL2