Re: Why performance improvement on converting subselect to a function ?

От: Tom Lane
Тема: Re: Why performance improvement on converting subselect to a function ?
Дата: ,
Msg-id: 4578.1059514334@sss.pgh.pa.us
(см: обсуждение, исходный текст)
Ответ на: Re: Why performance improvement on converting subselect  (Rajesh Kumar Mallah)
Ответы: Re: Why performance improvement on converting subselect to a function ?  (Rajesh Kumar Mallah)
Список: pgsql-performance


Rajesh Kumar Mallah <> writes:
> Tom Lane wrote:
>> Odd.  Apparently the planner is picking a better plan in the function
>> context than in the subselect context --- which is strange since it
>> ought to have less information.

> [ verbose plan snipped ]

Well, that sure seems to be the same plan.  Curious that the runtime
wasn't about the same.  Perhaps the slow execution of the first query
was a caching effect?  If you alternate trying the query both ways,
does the speed difference persist?

            regards, tom lane


В списке pgsql-performance по дате сообщения:

От: Tom Lane
Дата:
Сообщение: Re: Why performance improvement on converting subselect to a function ?
От: Rajesh Kumar Mallah
Дата:
Сообщение: Re: Why performance improvement on converting subselect to a function ?