Re: Alternative to slow SRF in SELECT?

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: Alternative to slow SRF in SELECT?
Дата
Msg-id CAKFQuwY=jQLdnv4LtAm8hDdJTnQPjT55iWNcjUmrNu1pEY_ZHw@mail.gmail.com
обсуждение исходный текст
Ответ на Alternative to slow SRF in SELECT?  (Markur Sens <markursens@gmail.com>)
Список pgsql-general
On Tue, May 17, 2022 at 7:19 AM Markur Sens <markursens@gmail.com> wrote:
I have the following  case

select 
my_srf_func(otherfunc(h))
from (values (‘…’::mytype),

         as temp(h);



Any alternatives on how I could rework the query or the my_srf_func to speed things up, without having too many subqueries?


Placing the SRF function in the target list is now largely deprecated.  Table producing functions belong in the FROM clause.  The introduction of LATERAL joins made this possible.  My preference is to retain the JOIN syntax.

SELECT *
FROM (...) AS temp (h)
JOIN my_srf_func(h) ON true

David J.

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

Предыдущее
От: Markur Sens
Дата:
Сообщение: Alternative to slow SRF in SELECT?
Следующее
От: "David G. Johnston"
Дата:
Сообщение: Re: Restricting user to see schema structure