Re: function calls optimization - Mailing list pgsql-hackers

From Tom Lane
Subject Re: function calls optimization
Date
Msg-id 18500.1572533126@sss.pgh.pa.us
Whole thread Raw
In response to Re: function calls optimization  (Andres Freund <andres@anarazel.de>)
Responses Re: function calls optimization  (Andres Freund <andres@anarazel.de>)
Re: function calls optimization  (Andreas Karlsson <andreas@proxel.se>)
List pgsql-hackers
Andres Freund <andres@anarazel.de> writes:
> On October 31, 2019 7:06:13 AM PDT, Andrzej Barszcz <abusinf@gmail.com> wrote:
>> I almost finished patch optimizing non volatile function calls.
>>
>> select f(t.n) from t where f(t.n) > 10 and f(t.n) < 100;  needs 3 calls
>> of
>> f() for each tuple,
>> after applying patch only 1.
>>
>> 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.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: function calls optimization
Next
From: Andres Freund
Date:
Subject: Re: function calls optimization