Обсуждение: [MASSMAIL]Replace FunctionCall2Coll with FunctionCallInvoke

Поиск
Список
Период
Сортировка

[MASSMAIL]Replace FunctionCall2Coll with FunctionCallInvoke

От
Andy Fan
Дата:
Hello,

During the review of using extended statistics to improve join estimates
[1], I found some code level optimization opportunities which apply to
existing code as well. To make the discussion easier, open this new
thread.

I don't know how to name the thread name, just use the patch 1 for the
naming.

commit d228d9734e70b4f43ad824d736fb1279d2aad5fc (HEAD -> misc_stats)
Author: yizhi.fzh <yizhi.fzh@alibaba-inc.com>
Date:   Mon Apr 8 11:43:37 2024 +0800

    Fast path for empty clauselist in clauselist_selectivity_ext
    
    It should be common in the real life, for example:
    
    SELECT * FROM t1, t2 WHERE t1.a = t2.a AND t1.a > 3;
    
    clauses == NIL at the scan level of t2.
    
    This would also make some debug life happier.

commit e852ce631f9348d5d29c8a53090ee71f7253767c
Author: yizhi.fzh <yizhi.fzh@alibaba-inc.com>
Date:   Mon Apr 8 11:13:57 2024 +0800

    Improve FunctionCall2Coll with FunctionCallInvoke
    
    If a FunctionCall2Coll is called multi times with the same FmgrInfo,
    turning it into FunctionCallInvoke will be helpful since the later one
    can use the shared FunctionCallInfo.
    
    There are many other places like GITSTATE which have the similar
    chances, but I'd see if such changes is necessary at the first
    place.


[1]
https://www.postgresql.org/message-id/c8c0ff31-3a8a-7562-bbd3-78b2ec65f16c%40enterprisedb.com 

-- 
Best Regards
Andy Fan

Вложения

Re: Replace FunctionCall2Coll with FunctionCallInvoke

От
Michael Paquier
Дата:
On Mon, Apr 08, 2024 at 12:25:00PM +0800, Andy Fan wrote:
> During the review of using extended statistics to improve join estimates
> [1], I found some code level optimization opportunities which apply to
> existing code as well. To make the discussion easier, open this new
> thread.

Is that measurable?
--
Michael

Вложения

Re: Replace FunctionCall2Coll with FunctionCallInvoke

От
Andy Fan
Дата:

Hello Michael, 

> [[PGP Signed Part:Undecided]]
> On Mon, Apr 08, 2024 at 12:25:00PM +0800, Andy Fan wrote:
>> During the review of using extended statistics to improve join estimates
>> [1], I found some code level optimization opportunities which apply to
>> existing code as well. To make the discussion easier, open this new
>> thread.
>
> Is that measurable?

I didn't spent time on testing it. Compared with if the improvement is
measureable, I'm more interested with if it is better than before or
not. As for measurable respect, I'm with the idea at [1]. Do you think
the measurable matter? 

[1]
https://www.postgresql.org/message-id/CA%2BTgmoZJ0a_Dcn%2BST4YSeSrLnnmajmcsi7ZvEpgkKNiF0SwBuw%40mail.gmail.com 

-- 
Best Regards
Andy Fan