Re: function calls optimization

Поиск
Список
Период
Сортировка
От Andreas Karlsson
Тема Re: function calls optimization
Дата
Msg-id a2bc0407-a41e-7798-0129-d38a7bd5e359@proxel.se
обсуждение исходный текст
Ответ на Re: function calls optimization  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On 10/31/19 3:45 PM, Tom Lane wrote:
> Andres Freund <andres@anarazel.de> writes:
>> On October 31, 2019 7:06:13 AM PDT, Andrzej Barszcz <abusinf@gmail.com> wrote:
>>> Any pros and cons  ?
> 
>> Depends on the actual way of implementing this proposal. Think we need more details than what you idea here.
> 
> We've typically supposed that the cost of searching for duplicate
> subexpressions would outweigh the benefits of sometimes finding them.

That is an important concern, but given how SQL does not make it 
convenient to re-use partial results of calculations I think such 
queries are quite common in real world workloads.

So if we can make it cheap enough I think that it is a worthwhile 
optimization.

Andreas



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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: function calls optimization
Следующее
От: Tom Lane
Дата:
Сообщение: Re: function calls optimization