Re: partitioning performance tests after recent patches

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: partitioning performance tests after recent patches
Дата
Msg-id 15694.1555340425@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: partitioning performance tests after recent patches  (Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>)
Список pgsql-hackers
Amit Langote <Langote_Amit_f8@lab.ntt.co.jp> writes:
> On 2019/04/15 4:19, Floris Van Nee wrote:
>> 2) Is running non-inlined SQL functions with a generic plan even the best option all the time? Wouldn't it be better
toadopt a similar approach to what plpgsql does, where it tries to test if using a generic plan is beneficial? The
non-inlineableSQL functions suffer a big performance hit for a large number of partitions, because they cannot rely on
staticplanning-time pruning. 

> I'd never noticed this before.  It indeed seems to be the case that SQL
> functions and plpgsql functions are handled using completely different
> code paths, of which only for the latter it's possible to use static
> planning-time pruning.

Yeah.  Another big problem with the current implementation of SQL
functions is that there's no possibility of cross-query plan caching.
At some point I'd like to throw away functions.c and start over
with an implementation more similar to how plpgsql does it (in
particular, with persistent state and use of the plan cache).
It hasn't gotten to the top of the to-do queue though, mostly because
I think not many people use SQL-language functions except when they
want them to be inlined.

            regards, tom lane



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

Предыдущее
От: Amit Langote
Дата:
Сообщение: Re: hyrax vs. RelationBuildPartitionDesc
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Accidental setting of XLogReaderState.private_data ?